What is Google Tag Manager and how can I get it on my website?

Google Tag Manager (GTM) is a free tool that helps you to easily develop and organise the tracking infrastructure on your website. This allows you to see how users are interacting with your website and assess your overall site performance. With GTM, tracking can quickly be updated without manual hard-coding, increasing the efficiency of the implementation   process and reducing the dependence on web-developers. 

GTM has a comprehensive range of native connections (e.g. Google Analytics) where custom data can be sent and analysed so that you can measure your KPIs. 

You can track a significant number of events in Google Tag Manager including: Link clicks, PDF downloads and cart abandonments. 


Why should I use Google Tag Manager?

There are a number of advantages to using Google Tag Manager, some of these include:

  • Speed - GTM means you don't need to wait for spare developer resources or release dates. Tracking can function independently of developers, freeing up developer time and increasing its flexibility.
  • Security - In the unlikely event that issues should occur with tracking, code can be easily removed within a few seconds rather than having to roll back to a previous website version.
  • Ease - GTM is set up so that anyone can use it, even if you are not a techy person. There are more complex depths to it, and if you  wish to explore these, there are a vast number of  resources on the internet that can help you here.


The 3 Main Components of Google Tag Manager

  • Tags - Snippets of code added to a page that send the selected data to your desired source.
  • Triggers - The conditions that must be satisfied for a tag to be sent to your source.
  • Variables - Placeholders for a changing value (e.g. URL) that can be passed to the source or used to create triggers.


What are ‘Tags’ used for in Google Tag Manager?

Tags are your what and where. They are code snippets which dictate what data you want to capture and where you are going to send it. 

Google Analytics is usually the most common type of tag implemented. However, there are many other possibilities, including Hotjar, LinkedIn Insight and Google Optimize. 

GTM offers a user interface which means you don’t have to write the full code snippet out yourself - even though it has scripting capabilities available for use in a wide range of scenarios. 

In the majority of cases, you only need to select the relevant data to be captured and your account details. Below we see an example of a GA tag that is firing an event when the “Blog Pageview Trigger” is satisfied. 

What are ‘Triggers’ used for in Google Tag Manager?

Each tag must also be accompanied by at least one trigger, otherwise, it can’t be fired. 

GTM has plenty of trigger types available to align with your marketing needs. These include pageviews, clicks, scroll depth and element visibility. 

Take a moment to consider the trigger below. It could be used to record pageviews to the Blog pages by firing only when a page is viewed where the URL contains /blogs/. 

The table below shows other examples of trigger usage:

What are ‘Variables’ used for in Google Tag Manager?

Variables are placeholders for values that can be used in both tags and triggers (or even other variables). While mostly used as part of the condition of a trigger, they can be used to dynamically capture values in tags. 

One such example of a built-in variable would be Page URL (shown in the trigger example above), which returns the full URL of the page a user is viewing. Other built-in variables include: Click Text, Page Hostname, Referring Website, Video Interactions, Form titles. 

Only a few variables are activated by default so make sure to configure any which you want to use before creating tags.These built-in variables have their limitations, so GTM allows you to create your own user-defined variables that may better suit your requirements. These hugely powerful variables include writing custom JavaScript to capture information from the HTML of the page.


How to set up Google Tag Manager

Implementing Google Tag Manager onto your website is relatively straightforward. Once you’ve created an account, you need to add a GTM container using your website’s hostname. You can also create containers for iOS, Android and AMP. 

Google Tag Manager will then provide you with two container snippets that need to be added to your webpage. Ideally, you want the first snippet to be added immediately inside the <head> of your page. This ensures that it is loaded quickly, reducing the chances of any users evading your tracking. The second snippet should be added immediately after the opening <body>. 

If you’re not sure how to add the snippet to your site then have a look here on the Google Support site or speak to a developer.


In need of Google Tag Manager support?

For more information, visit our Google Tag Manager services page here to see how Semetrical can help to develop and organise your tracking infrastructure.