Using Google Tag Manager to Add Events

 

Just a quick reference around adding events to websites using google tag manager – events are managed through event listeners, which themselves need to be set up as tags in the container.

So you fire the event listener tag on pages you wish to have event tracking, in order to have GA listen for events. These events can be clicks, form submits, link clicks and timers. The difference between the two types of click tags seems to be ‘Click’ listener records all clicks and will not allow you to specify which link you want tracked. Link click events would be used to pick up individual links.

You check for the event listener firing in Google Tag Manager using {{event}} equals gtm.click

And then check for a specific element using {{element id}} equals [id used in HTML].

The guide suggests that “Note that checking the value only works in a rule that’s used by the tag that fires in response to the listener” – So this means “Checking the value” – means using {{element id}} equals [HTML ID] only works, if it is in the same rule as the listener check

So two tags –

1)       Add a site wide tag to cover the pages you want event listening on – choose the tag type and add the rule for tag firing (.* for all pages matching regex)

2)       Add a google analytics tag, type ‘event’ and add the rules:

  1. {{event}} equals gtm.click
  2. {{element id}} equals [HTML ID]

URLS:

http://www.razorsocial.com/google-tag-manager/

https://support.google.com/tagmanager/answer/3415369?hl=en-GB

https://support.google.com/tagmanager/answer/3420054

https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide#Anatomy

Issues Identified:

Dramatic drop in bounce rate

On implementation of a specific set of event listeners/click tags we noticed a significant drop in bounce rate.  Our site receives a lot of blog traffic and therefore bounce is relatively stable for this type of viewing behaviour. We introduced 2 events to track some product recommendations on the page, the first of which fired whenever the recommendations were loaded, and the second if any click event was fired from them.

As the first event (on the load of the recommendations) was fired, GA interpreted this as the first page load had a second interaction and therefore the visit did not bounce. The fix for this is identified in the old GA (ga.js) description of events by allowing a flag to be set for non-interaction events (should be set to true in this instance), the event would still fire but prevent the interaction from being assigned to the user and therefore not affect bounce rate.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s