Tracking banner clicks on website using Google Analytics (UTM and Event Tracking)

2.5k views Asked by At

I have successfully added event tracking to the banners on my website but I have a query that I cannot find an answer to after searching for hours.

Can I use UTM tracking alongside Event tracking?

The reason I ask this is because if a client advertises on the website using a banner but specifies a link such as - www.clientwebsite.com&utm_medium=display&utm_source=mywebsite.com&utm_campaign=Autumn+Collection&utm_term=Shoes - but my website code already has event tracking on it - would it work on both ends so that I see who clicked on the banner and the client could see the traffic from the banner to their site?

Below is the code that I am using to get track the clicks on the banner:

<a href="http://www.website.com" onClick="ga('send', 'event', 'Top Banner', 'Banner_Click', 'Example Top Banner');" target="_blank"> <img class="mid-banner" src="/images/banners/middle/companyname_banner_month_year1.jpg" /> </a>

So basically the code would be:

<a href="http://www.clientwebsite.com&utm_medium=display&utm_source=mywebsite.com&utm_campaign=Autumn+Collection&utm_term=Shoes" onClick="ga('send', 'event', 'Top Banner', 'Banner_Click', 'Example Top Banner');" target="_blank"> <img class="mid-banner" src="/images/banners/middle/companyname_banner_month_year1.jpg" /> </a>

Can I do that?

Any help would be much appreciated!

Cheers,

Dave

1

There are 1 answers

1
Eike Pierstorff On

Yes. Event tracking is not bothered by parameters in the link URL, it is absolutely fine to use both.

The only thing you need avoid is UTM parameters for internal links to your site (since that would overwrite the original campaign info and start a new session) but that does not seem to be your use case; as long as the URL points to a third party site you are fine.