Google Tag Manager – Setup, Features and Benefits

Google-tag-manager-blog-Loves-data-994x729.jpg

Google Tag Manager (GTM) is a free solution for managing Google Analytics, advertising and other analytics and marketing tags across your website (or multiple websites). By installing a single, universal JavaScript tag on your website, you can then use the tool’s interface to insert other JavaScript tags, based on rules that are specified in the tool.

Following its launch in 2012, Google Tag Manager quickly became the number one tag management solution in the market, with an updated version 2 of the tool in October 2014. This post will help you get started with the latest version, but if you’re already using Google Tag Manager on the previous interface, why not get up to speed on the differences with our quick guide?

What is Google Tag Manager?

Google Tag Manager replaces the traditional approach of individually including tags in the source code of your site(s). Using Google Tag Manager produces dramatic time savings in tag deployment and management. Although the tool is designed for close integration with Google Analytics, it is a stand-alone tool and needs to be set up and configured outside of Google Analytics.

Who should use Google Tag Manager?

The tool is designed for medium to larger scale websites and organisations that have multiple websites. If you just have a single, small to medium website and are not using a customised or advanced installation of Google Analytics (i.e. Event Tracking, Custom Dimensions, etc.), then there is no rush to get Google Tag Manager installed on your website.

If you’re looking to expand your use and customisation of Google Analytics, or are looking to install additional tracking tags, then it might be worth setting up Google Tag Manager now to make your life easier in the future.

Google Tag Manager terminology

(1) Account Think of your Google Tag Manager account like your Google Analytics account: each account should only be used to track websites for one company. If you’re a looking after tracking for multiple, unrelated companies (e.g. you are an agency) then you should have a separate Google Tag Manager account for each of your clients.

Account best practices

  • One account per company
  • The company for whom the account is managed should be the account owner

(2) Container Within your Google Tag Manager account, you can set up separate containers (these are analogous to profiles within Google Analytics). Creating a new container will give you a unique piece of JavaScript that will need to be installed on your website(s). If you’re using Google Tag Manager to deploy Google Analytics, you should install only this JavaScript piece and remove your separate Google Analytics tracking code.

Container best practices:

  • Container code should be applied to every page on your website
  • Generally you should use one container per domain (but just like Google Analytics, you can use a container across multiple domains)

(3) Data Layer This is a powerful additional feature you have available when implementing Google Tag Manager on your website. The Data Layer is a way of consolidating the data you need for your various tags in a way that is easy to access and pull into Google Tag Manager. You can use the data within tags, or even to create conditions on when to trigger particular tags to fire.

(4) Tags Tags are the various snippets of code on your website typically performing tracking and analytics duties. For example, you might have Google Analytics tags, Google AdWords conversion tracking tags and other third-party tracking tags. These can all be deployed through Google Tag Manager instead of being installed directly onto your web pages.

(5) Triggers Triggers allow you to decide when to fire a particular tag. For example, lets say you want to fire a tag only on the ‘thank you’ page of the website -– perhaps a conversion tracking tag or a Google Analytics ecommerce hit tag. You could simply define a trigger for page views where the URL path matches your thank you page, then attach that trigger to your tag.

(6) Variables Variables act as placeholders for data that you can reuse in your Google Tag Manager tags, triggers and even within other variables. For example, you could create a variable that holds your Google Analytics property ID, making it easy if you have several Google Analytics tags and ever want to change which property they are sending hits to. Or you could feed the value of a transaction into a variable and then use that variable to decide when to fire a Google AdWords Remarketing tag.

Before implementing Google Tag Manager

If you have lots of existing tags on your website, then you will need to plan your Google Tag Manager implementation carefully. If you simply remove the Google Analytics tracking code from your website and replace it with Google Tag Manager, you might lose a lot of data, so remember to consider ALL the tags you are using (or customising);

  • Google Analytics Tracking Code
  • Google Analytics customisations, including:
    • Ecommerce
    • Events
    • Custom Variables
    • Virtual Pageviews
    • Etc.
    • Google AdWords Conversion Tracking
    • Google AdWords Remarketing Tags
    • DoubleClick Tags
    • Other custom tags

Google Tag Manager setup

Step 1 Log into Google Tag Manager at tagmanager.google.com and create your account and your first container.

Step 2 Install the Tag Manager code on all the pages of your website(s) immediate after the opening <body> tag.

Step 3 If you want to use Google Tag Manager to send your hits to Google Analytics, create a Google Analytics tag in your container and insert your Google Analytics ID (e.g. UA-123456-1). You can specify when you want to trigger the tag to fire, but selecting the default option of ‘all pages’ will mean that the tag will load and send a hit to Google Analytics on every page that has the Google Tag Manager code installed.

Step 4 To publish your container (i.e., make your container and its tags work on your live website), just click the red ‘publish’ button at the top right of the screen and confirm on the pop-up window that appears.

That’s it – your first Google Tag Manager setup is complete!

This is an update to an article first published in 2012