Blog

Google Tag Manager: Everything You Need to Know

Written by Lukáš Lískovec | 4/25/22

In this article, you'll find a comprehensive guide to setting up and using Google Tag Manager, as well as the benefits of using it for you and your business.

Content

Introduction

What Is Google Tag Manager

Benefits of Google Tag Manager

How to Set Up Google Tag Manager

Best Practices of Google Tag Manager

Troubleshooting in Google Tag Manager

Conclusion

Introduction

The digital environment is constantly evolving, for this reason it can be difficult to keep up with the latest trends and innovations. 

One of the most popular tools for managing online marketing activities is the free tool Google Tag Manager (GTM), which allows you to customize tags based on location, actions, or user behavior so you know exactly what events are happening on each website.

This allows you to effectively monitor page views and understand how visitors are interacting with your website.

What Is Google Tag Manager?

Google Tag Manager (GTM) is a powerful tool to help you manage and configure your monitoring data.

It provides a simple interface for creating, editing and activating marketing tags, which are measurement or advertising system codes. 

Thanks to these tags, which are usually written in JavaScript, GTM allows you to track the behaviour and activities of all visitors to your website.

The advantage is that only the Google Tag Manager code is inserted into the HTML of the website, i.e. you can further manage the individual measurement tags directly in its interface.

With GTM, you can also use several analytics tools and software to measure the performance of your website, while also easily testing various marketing technologies (e.g. advanced dynamic remarketing Google Ads).

What Analytical Tools Does GTM Support?

  1. Google Analytics - tracking site performance and user actions
  2. Meta Pixel - tracking site visitors and displaying targeted ads 
  3. AdWords Conversion Tracking - conversion tracking and campaign optimization
  4. Hotjar Tracking - tracking user behavior on the website 
  5. Optimizely - testing different versions of a website to increase conversions 
  6. Crazy Egg - tracking user behavior and heatmap analysis 
  7. Bing Ads - conversion tracking and campaign optimization 
  8. LinkedIn Insight Tag - tracking user behaviour and displaying targeted ads 
  9. DoubleClick Floodlight - conversion tracking and campaign optimization 
  10. Twitter Universal Website Tag - tracking website traffic and serving targeted ads

And many others…

Benefits of Google Tag Manager 

In this section of the article, we'll look at the benefits of using Google Tag Manager.

Increased Efficiency: the Google Tag Manager (GTM) streamlines and simplifies the process of managing tags and tracking code on your website and allows you to quickly implement various tracking changes.

Easier collaboration: the GTM allows multiple users to access and edit tags, making it easier for teams to collaborate on different projects.

Greater accuracy: The GTM interface provides detailed information about each tag, ensuring you get high accuracy of the data. In addition, all measurement tools (Google Analytics, Google Ads, etc.) are implemented in the same way and only take the data "served" by Google Tag Manager.

Automated tracking: GTM automatically tracks various events happening on your website, making it easy to monitor user behaviour.

Enhanced security: the GTM provides a relatively high level of security, making it more difficult for malicious users to access and manipulate your website code in any way.

Quickness: tags can be deployed to Google Tag Manager containers in moments.

More customization options: GTM allows you to customize tags to your specific needs, allowing for more detailed tracking of user behavior.

Cost saving: GTM is available for free, so there is no need to pay for expensive tracking tools.

For an up-to-date overview of what GTM can do, follow: Overview of published news in GTM.

How to Set Up Google Tag Manager

In this section, we'll walk you through how to create an account, add tags to your site, and configure it to automatically track events.

Creating an Account

The account is essentially the main and highest organizational level in GTM. 

Go to tagmanager.google.com and click on "create an account". For example, the name of your company can be under the account name.

After creating an account, you will be provided with a unique container ID that you can use to link your website to GTM.

At this point, you can start adding individual tags to it.

Tag Containers

Containers are "boxes" in which tags are stored. 

They are the main organizational unit in Google Tag Manager that is used to group relevant tags together. 

A single container can contain multiple tags, and each container can be configured to run only when certain conditions are met.

In this step, you also decide where you want to use the container (websites, mobile apps, etc.).

In order to install a container on your website, you must get the appropriate piece of code, which will automatically appear immediately after you create a new container. 

The code consists of two parts, the first part must be inserted directly into the <head> and the second part directly at the beginning of the <body> exactly according to the instructions you get immediately when you generate the code.

More detailed instructions can be found here: Tag Manager Help

Adding Tags to GTM Containers

To add a tag to a container, you need to use the Google Tag Manager interface.

However, if you already have some measurement tags on your site and are migrating to GTM, it is important to remove these original codes from your site to avoid duplicating measurement data.

To add a new tag to your site, go to the tag dashboard and click "New".

In the " Tag Configuration " section, select "Conversion Linker" (this will measure conversions correctly in different web browsers).

Select "All Pages" as the rule to run the tag and save the tag.

After that, just check if the tags are launching correctly using the "Preview" button and click "Submit".

Configure Tags

The GTM interface makes it easy to set rules and variables for individual tags.

Variables allow you to store data that you know you will need at some point in the future.

For example, you don't have to type in the Ads ID (e.g. 123456789) separately for each new tag that you want to send data to Google Ads. Instead, you create a variable to store this unique ID and name it, for example, G-Ads ID. 

The triggers are used to define when the tag should be launched. 

Once an event is detected, and all conditions included in the rule are met, the corresponding tag is executed.

GTM distinguishes a number of different events, e.g. page views, clicks, custom events, scrolling on a page, etc.

Best Practices of Google Tag Manager

Use preview mode to make sure tags are triggering correctly.

Use folders to organize tags, triggers and variables.

Use integrated tags to minimize errors.

Back up tags, triggers, and variables regularly.

Use version control to check and revert changes.

Use descriptive tag, trigger and variable names for easier tracking.

Use the built-in security features of Google Tag Manager.

Use Google Analytics support.

Set up regular testing and verification.

Troubleshooting in Google Tag Manager

Troubleshooting is an inevitable part of implementing any new tool. Google Tag Manager is no different. 

The most common problems

Implementation of incorrect tags: can be caused by misconfigured triggers or incorrect setting of custom variables.

Incorrect or outdated tags: the tags you use must be current and correct. It is important to regularly check the GTM interface and make sure that the tags are configured correctly. 

Unpublished changes: check if you have published a container with changed tags. Publishing a container can take some time, so make sure Tag Manager has completed this process before testing. Try to refresh the page or clear your browser cache.

See the "Troubleshoot issues" page for all problems, including how to resolve them.

Conclusion

Google Tag Manager is a good tool that allows you to manage, configure, and deploy tags to a website. 

It removes the need for manual tagging, allowing you to focus on more important tasks such as creating marketing campaigns or improving user experience.

The simple and intuitive interface makes it easy to use while providing a comprehensive view of how tags interact with each other, which can help you identify areas that need improvement.

If you're already familiar with Google Tag Manager, we recommend you take a look at how to improve your website optimization with Hotjar.