Appending UTMs to the buttons using class name attributes (Selectively)

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.

This technique is extremely useful if you are sending out traffic (ouf of your domain). Or you want to specifically append UTMs to some links.

<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>

Revision #6
Created Tue, Oct 20, 2020 10:56 PM by Leman
Updated Mon, Mar 7, 2022 4:13 PM by Leman