How to setup Event Tracking using GTM

Event Tracking using the GTM is essential for measuring actions on a website that aren’t just page loads.

This can include tracking clicks, PDF downloads or clicks on the external links. Events can be tracked as goals if they are valuable to the business.

Setting the tag for Event Tracking using the GTM is the same process every time. The difference comes with creating the triggers that fire.

If you have links on your websites to pages or files that can’t track Javascript such as PDFs and MP3s, you can see how many people clicked on these links if you set up event tracking.

We’ll use PDFs as an example.

The first thing you need is a trigger that states “fire if someone clicks on a PDF link”.

Go to the “Triggers” section of Google Tag Manager and create a new trigger named PDF Click.

  • Trigger Type: Click – Just Links
  • Some Link Clicks
  • Click URL contains .pdf

Note: Click URL value can be different for your website.

Create an event tracking tag with the following:

  • Category: PDF
  • Action: Download
  • Label: {{Click URL}}
  • Value: (decide your own value)

Note: You can set the above field values as per your preference.

Save the tag with the trigger you created earlier, test it in preview and debug mode if the tag fires only on trigger condition set and where it’s supposed to be.

You may want to reverse Category and Action depending on how you generally configure events.

I like to have “Action” as the action is taken (e.g. they downloaded a file), but some people prefer to have “Category” as the larger encapsulating feature.

As long as you are consistent with what you consider a “category” and what you consider an “action”, that’s all that matters.

Tips:

  • Try to be as consistent as possible. Note which event names have capital letters and which ones don’t.
  • Make sure Event Actions and Categories match where required.
  • Test before you push to live. I use the Google Tag Manager Preview and Debug mode for this to test before publishing it
  • Test after you’ve pushed to live again. I use Google Analytics Real-Time to see what is being pushed into GA.

Need help with Digital Analytics? Get in touch:

Leave a comment