Skip to main content

Appending UTMs to the buttons using class name attributes

If you have a button or link that you would like to append all the collected UTMs to. Use the class variable utm-out as it is shown below.

<a href="https://www.someoutgoinglink.com/" class="utm-out">

HandL UTM Grabber automatically scan all the links and buttons having utm-out class and append all the UTMs automatically so your final URL will be like this.

<a href="https://www.someoutgoinglink.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale&utm_term=term&utm_content=content" class="utm-out">

utm-out also works if it is at the parent level. For example

<div class="parent-div utm-out">
	<a href="https://www.someoutgoinglink.com/">
</div>

This will also populate all the UTMs like this

<div class="parent-div utm-out">
	<a href="https://www.someoutgoinglink.com/?utm_source=google&utm_medium=cpc&utm_campaign=spring_sale&utm_term=term&utm_content=content">
</div>