Google Tag Manager: if you know it, you don’t avoid it!

by Beatrice Bottoni


If you are new in the world of Digital Analytics you might be stunned by the amount of tools at your fingertips, starting from Google Analytics tags: classic, universal, tag manager … which tracking code should I use?

Let’s start talking about the differences between the various codes, to get to the question that we care most: why should I use (or switch) to the Google Tag Manager?

  •  Classic (urchin.js): please note in advance that this tracking code is actually deprecated, therefore, its use is not recommended. Why? This type of tag is placed inside <body> tags in the HTML of your site, so when page is displayed, in order to collect data for that visit first the whole page has to be loaded. What if the user stops (intentionally or not) navigation before the page has fully loaded? Clearly it won’t be tracked and you missed a page view ..
  • Asynchronous code (ga.js): This issue can be avoided by using the so-called asynchronous code – that means that data collection is executed parallel to page loading, as if these two activities were “running” on two separate lanes of a highway. To allow this, code must be placed at the top of HTML, before the closing tag </ head>.
  • Universal Analytics (analytics.js): This is the latest version of the tracking code, a new standard that will soon be mandatory for all accounts. The codes previously described based accesses on browsing session, while Universal tag bases them on users. That means it is possible to identify a user (through a uniquely assigned user id) by associating it to multiple sessions and monitoring its cross-device browsing. This tag allows you to collect data not only from websites but from any digital device, thus including mobile apps, game consoles as well as information totems (like those that can be found in museums or at tourist information points). This way you are able to analyze all the data directly from a single interface, Google Analytics (for more details and benefits of switching to Universal, read here).

Now we come to the true star of this post … the Google Tag Manager! It’s a tag tracking management system, that allows you to manage in an integrated way not only Google tags (eg. Analytics, AdWords, Remarketing, Doubleclick) but also third-party ones (eg. ComScore).

Tag implementation is much simpler, as there is no need to put any script in the HTML code of the site and everything is done by interface; so anyone (even without any particular technical skills) is able to add, update and remove tags.evoluzione

If I already use the Universal code and I’m not interested in adding third-party tags, why should I use Tag Manager?

First, if you do not need this right now, you could in the future :) – moreover, having Tag Manager installed would avoid potential long waiting times for adding tags by developers.

Another great advantage, that will save you time and resources, it is automatic event tracking; earlier it was necessary to implement event tracking manually editing site’s code.

With Tag Manager this is no longer necessary, as any kind of event tracking requires just few steps:

1. Create a Listener: this tag is responsible for listening and recording all actions made by a user on the page. For example, you can listen all the clicks (with a Click listener), form submissions or clicks on site links (using a click link listener).

2. Create a Tag: used to define exactly what to track (which category of events? Eg. clicks to an external link), specifying the type of tag (in this case, Google Analytics), the action (click ) and under which property track them (UA-XXXXXXX-X).

3. Create a rule: the last step is to create a rule that is going to activate our tag, specifying at which specific elements are we going to apply the tag. For example, if your goal is to track clicks on Outbound links (links to external sites), you just need to specify that external link URL has not to be the same as your site’s URL (for a step-by-step guide look here).

You’re done! Now Tag Manager will automatically track all clicks to other sites, with no need to edit a single line of code.

Most of times things go as smooth as described, however sometimes it is not always possible (easy and intuitive) to use Tag Manager – in next posts we tell you about a case that gave us a bit of a hard time.