Understanding Google Tag Manager: What You Need To Know. (Updated November 2022)

 understanding of Google tag manager

What is Google Tag Manager (GTM)?

Google Tag Manager (GTM) is a Tag Management System (TMS), which allows its users to manage all their website tracking and analytics scripts in one central place. For marketers, Google Tag Manager provides a simplified UI that makes tracking things like clicks, forms and downloads an easy task, without the need for a developer.

Initial versions of tag manager were launched with default templates based around Google’s other marketing products, such as DoubleClick, Google Display Network and AdWords Conversion Tracking. Today, the platform has evolved into an entirely different beast and is one of the most powerful tools that every marketer should have in their arsenal.

How do I add Google Analytics tracking to my website using Google Tag Manager?

To get started with Google Tag Manager you’ll need to add two snippets of code to your website. In order to do this, follow these simple steps:

  • Click Workspace in GTM.
  • Find your container ID, formatted as “GTM-XXXXXX” on the top right of the window.
  • Click this ID to launch the Install Tag Manager box.
  • Here, you will see two code snippets. Copy and paste them into your website as instructed in the Install Tag Manager box.
    • Place the <script> code snippet in the <head> of your web page’s HTML output, preferably as close to the opening <head> tag as possible, but below any dataLayer declarations.
    • Place the <noscript> code snippet immediately after the <body> tag.

 

 Google Tag Manager code snippet for the

Google Tag Manager <head> snippet. Source

 Google Tag Manager body noscript snippet

Google Tag Manager <body> snippet. Source

After you’ve placed the code snippets on the site, you’ll need to do some testing. There are many ways you can verify that Google Tag Manager is working as it should. My preferred way of testing this is to use the Google Tag Assistant plugin for Chrome, coupled with Screaming Frog SEO Spider’s custom search feature. This method allows you to test that you’ve implemented the snippets correctly and that the snippet isn’t missing from any spurious non-templated pages.

What are tags in Google Tag Manager?

Tags are code snippets that can to be added to tag manager and are used for analytics, marketing and support purposes. Google Tag Manager currently supports around 80 third party tags which are tailored to the platform, making implementation simple and efficient. So efficient in fact, that a study performed by LunaMetrics found that tag implementation time was improved by 600% by using tag manager over traditional methods of tag implementation.

 Google Analytics 4 Configuration Tag in GTM
Google Analytics 4 configuration tag with consent settings in Google Tag Manager.

Google Analytics 4 configuration tag with cookie consent settings

What are triggers in Google Tag Manager?

Triggers cause tags to ‘fire’, or activate, when a specific event happens. These events can be anything from form submissions to button clicks, and so much more. For marketers, this is incredibly useful as you can easily track KPI related events, widening the scope of data in tools like Google Analytics and giving you the opportunity to make informed, data driven decisions to improve your marketing efforts.

Google Analytics phone number click trigger

What are variables in Google Tag Manager?

Variables in Google Tag Manager represent placeholders that are dynamically populated with data. For example, the “Click URL” variable would return the URL of a clickable link. Variables are useful within triggers to define when a tag should fire, or they can be used to dynamically capture values in tags.

 

 Built-in Variables in Google Tag Manager
Built-in Variables in Google Tag Manager

Google Analytics built-in variables

There are many variables built in to Google Tag Manager, but it’s also possible to create your own for enhanced customisation. In order to populate custom variables with data you will need to push the data you need into Google Tag Manager. This is done through the data layer.

What is the data layer?

The data layer is a JavaScript array which stores data from your web pages. It’s similar to a database that Google Tag Manager pulls data from your web pages to use in tag configurations. The data layer is automatically created when you add the GTM tracking script to your site. It’s up to you, however, to populate it with the data you want Tag Manager to be able to understand.

To do this you need to push information to the data layer. This can get quite tricky so you might want to get a developer involved, or if you relish a challenge then you can follow this step by step guide to the data layer.

Google Tag Manager opens up a realm of possibilities to expand your marketing efforts. It’s free, simple to use and is consistently growing in popularity. If you’re not using it already then there is no better time to start than right now.