A Beginner’s Guide to Google Tag Manager

If you use Google Analytics (GA) – like a large portion of the web – it’s possibly time to start thinking about Google Tag Manager (GTM). GTM is Google’s tag management system that conveniently, also integrates to the company’s other digital tools such as Google Adwords & DoubleClick. We’ve been eulogising both internally and to clients about the benefits of a tag management system – and in particular GTM – for a few months now, but I wanted to share an introductory guide to those who may not be familiar with the system. Firstly however, let’s delve into some definitions.

What is a Tag Management System?

Tags are – simply put – snippets of code that are placed in either the or of a page which enable tracking, analysis and reporting. Tag management software is a way for marketers and developers to administer these tags on their website. Tag managers enable several tags – such as Google Analytics, AdWords Remarketing, or even third-party tags such as AdRoll to be inserted into one all-encompassing container. Where previously you had several code snippets, this is all replaced by the tag management code.

What does GTM allow me to do?

GTM enables webmasters to give specific permissions to certain users so people can have access to different sections of the system, for marketers, it allows freedom over when tags are fired, dependent on certain conditions (rules) created by the user. For example, if you are using GA, you would usually wish to fire the tag on all pages across your site. Using the same example, you may wish to set up event tracking within GA, such as external link clicks or form submissions. You can tailor your events to only record when the appropriate rules are met.

What are the benefits of a Tag Management System?

Tag management allows for complex installations of tracking and analysis code snippets to be easily placed into websites, without ever needing to touch the code again. You just need to add the tag in your management dashboard and it will appear in the pages you designate – so long as the tag snippet has been inserted.

By streamlining the process of using one code snippet, you can improve the efficiency of your organisation by never requesting the help of a developer again; you can make the necessary changes yourself (there is a small caveat to this, but more on that later). Tag management systems have been around for quite a few years but most are paid, whereas Google’s has been free since it was launched in October 2012.

Additionally, event tracking within Google Analytics was only possible with the help of a webmaster or developer. Now marketers can take control over this process with the help of GTM. GTM also has a preview mode and revision history to both prevent errors and enabling reverts to previous versions if mistakes or issues occur.

“I’m sold on GTM” I hear your say. Well, let’s delve into how we can set up GTM and a Google Analytics tag.

How can I set up Google Tag Manager on my Website?

Firstly, head over to https://www.google.com/tagmanager/ and sign in in the top right hand corner. Follow the instructions if it’s your first time signing up with your email address and enter your account name. GTM’s structure has accounts at the highest level, and containers within those accounts. You then set up tags within each of those containers. A brief example of an account’s structure is shown below;

GTM table

Accounts can include a company or organisation, with lots of websites (such as a restaurant chain with different websites for each restaurant), or a small local company (like a local store) with only one site. Containers hold all the tags relating to one website or mobile application. For the purposes of this Google Tag Manager guide, we’ll focus on one website installation.Accounts & Containers

Enter your account name (normally the name of your organisation), the name of your container (normally the name of your website) and the domains required. Usually only one domain is required, but if your tags span more than one domain, you should enter the other domains in here. An example of this is Klood, where we have entered all three main subdomains – www.klood.com, services.klood.com & engine.klood.com. Choose your timezone and click “Create Account and Container” and then accept the terms of service.


Installing the Code

You are then presented with a screen requesting that you add the GTM container code into every page on your site you want to add tags to. This can easily be done using a Content Management System (CMS) and editing one of the template files. The GTM code snippet should be inserted after the opening tag. Make sure you remove any old instances of GA code so users are not being double counted.


This should be the only time you require a developer or webmaster’s help. I mentioned earlier that this is not always the case, and this normally involves event tracking when you may need a developer to tackle id or class issues with elements you want to track – but I’ll deal with this in a separate blog post and how the help of a developer may be required.

Adding your First Tag

In most instances, the first tag you’ll wish to apply is Google Analytics. As you can see from the image, you can do this right from the code container screen. Click the Google Analytics option and you’ll be presented with the following page;


On this screen you will need to enter the name of your tag (something descriptive like “Google Analytics” and the version you are using will suffice), and choose the tag type. Universal Analytics (UA) is selected as a default, but depending on the version of GA you use, you may need to select Classic Analytics from the drop down menu. However, you should probably see this as an opportunity to upgrade to Universal Analytics if you are still using Classic and ensure you are reaping the benefits of UA.

Once you have selected your analytics version, you need to retrieve your tracking ID from Google Analytics for Classic or Universal. Then decide whether you wish to enable Display Advertising Features. I’d strongly recommend this to start pulling in demographic data in GA, but it does impact your Privacy Policy so make sure yours is up to date before enabling this feature. The next stage is to choose the track type, this is set to page view by default and for the GA tag, this is appropriate. You should not need to access any of the advanced features, but you will have to set a firing rule.

A firing rule (as briefly explained earlier) details when the tag will become live. In most cases, you should set this tag to fire on all pages. To do this, click the add button in the firing rule section and click the check box, then hit save.


When you have clicked save in the Create New Tag screen, you will then have you first tag set up and ready to be published. Firstly however, you should preview the container before pushing it live. It’s important to action this because it enables users to test tags before they go live on the site. Justin Cutroni, Google’s Analytics Evangelist, explains how the next phase of the process is to create a new version, which you can do by clicking the Create Version button in the top right hand corner of the page.

After you have created your version you can then use the preview mode, to test yourself whether the tags are firing. I’d recommend watching this short video for a brief explanation of how this process works and how you can check your work.

Once you’re happy the tags are firing, all you need to do is click publish – and your Google Analytics code should now be live! To check it’s working, head over to the Real-Time report in GA to check your visits are being recorded. Unless you have your IP filtered out of the view you are reviewing, you should see live statistics of what page you’re looking at.

If you’re having any issues setting this up, feel free to reach out to me on Twitter and I’ll do my best to guide you through the process. Happy tagging!