Digital Marketing News


5 Universal Analytics event settings in Google Tag Manager

Dec 04, 2014

We all have very busy lives so I’m going to make this post nice and short, with screenshots that hopefully will make these Universal Analytics event set-ups pretty straightforward. But please let me know if you have any questions on any of these event settings.

1. PDF downloads

OK, let’s start with a very simple event: click on a .pdf document.

  • Tag: Universal Analytics, Event Track Type

 

Click image to enlarge.

Click image to enlarge.

The .pdf link is used as the event label with the {{element url}} macro, which is created by default in GTM.

  • Firing rule:

 

Click image to enlarge.

Click image to enlarge.

 

Tip: you can change the extension in the {{element url}} macro to whatever you need such as use {{element url}} contains .doc, as long as it’s a link.

 

2. Clicks on email addresses

We will use the {{element url}} macro again, but this time we’ll search for “mailto” in the link.

  • Tag: Universal Analytics, Event Track Type

 

Click image to enlarge.

Click image to enlarge.

 

  • Firing rule:

screenshot-www.google.com-2014-11-07-10-41-20-300x111

Tip: Change this to ‘tel:’ to track clicks on phone numbers – obviously you must use the tel: URL scheme to make this work, like this:

<a href= “tel:+6499201740″> Call us</a>

 

3. Outbound links

I like to distinguish outbound link to Social networks from the other outbound links. To do that instead of using two event tags with two different Event Categories (Social pages / Other outbounds), I use a lookup table macro like this:

 

Click image to enlarge.

Click image to enlarge.

Then I use this macro as the event category in the event tag.

  • Tag: Universal Analytics, Event Track Type

 

Click image to enlarge.

Click image to enlarge.

 

  • Firing rule:

screenshot-www.google.com-2014-11-07-11-16-14-300x179
 

4. Form submission

To track form submission as an event, you can use the Form Submit Listener tag. This tag is one of the Auto-Event Listener tags (Click Listener, Link Click Listener, History listener, etc.). You need to create them first if you want to use them in firing rules for other tags. However, this is no longer needed in version 2 of Google Tag Manager. See here for more information on Event Listener and the upcoming changes to GTM.

For the folks using the old interface, here is the Form Submit tag you need to create:

 

Click image to enlarge.

Click image to enlarge.

You want this tag to fire only if the form submission is successful (Check Validation box) and on all pages (or at least on pages where you have a form).

  • Tag: Universal Analytics, Event Track Type

Below the tag you would typically use for an enquiry/contact form:

 

Click image to enlarge.

Click image to enlarge.

 

  • Firing rule:

 

Click image to enlarge.

Click image to enlarge.

 

5. YouTube videos

This one is a courtesy of Stéphane Hamel from CardinalPath, brilliant.

I’m not going to repeat his great post here, but basically his solution consists of creating:

  1. A “YouTube Listener” Custom HTML tag
  2. A “YouTube is present” Custom JavaScript macro
  3. Two Data Layer Variable macros for the UA event action and category
  4. And, of course, the UA Event YouTube tag

Conclusion

Here you go: five event tracking tags, which will hopefully give you more insights on your user behaviour. Google Tag Manager is a very powerful and flexible tool, which can give you access to a whole set of analytics insights while minimising the development work.

What do you think? Any other ideas of user interactions you’d like to track? Please get in contact!