Google Tag Manager: What Is It and How Does It Work?

  • There are no suggestions because the search field is empty.

By Jorge Vergara, on 24 May 2021

In digital marketing it is essential to be able to measure the results of your actions through metrics such as traffic, events, or conversions.

In order to measure what is happening on your website on a technical level, you have to install a series of tags or code snippets. In the past, this process could be very complex and required specialized technical help. But thanks to Google Tag Manager, managing tags on your website is now easier than ever.

* Do you want to improve or kickstart your SEM strategy? We're sharing  everything you need to know about SEM and Google Ads in our FREE ebook!  Download it here.

Google Tag Manager What Is It and How Does It Work

What Is Google Tag Manager?

Google Tag Manager is a free tool that allows you to add tracking, web analytics, and measurement codes to any website or application. It's designed to be simple to use and does not require specialized programming skills, so marketers can easily link the measurement solutions they need to their sites.

Advantages of Using Google Tag Manager

  • Streamline tag management. Google Tag Manager allows you to add and modify tags to measure all aspects of your marketing strategy. Its design is easy and intuitive, so you can make all the changes you need.

  • Reduce the risk of tag management errors. Google Tag Manager has a very simple error checking system, loads tags quickly and allows you to test in a pre-production environment. All this makes it easy for you to ensure that your website works perfectly at all times.

  • Implement Google and third-party tags. Google Tag Manager supports all types of tags and has a large number of preconfigured tag templates. If you can't find a particular tag, you can add it as a custom tag.

  • Collaborate with your team. Google Tag Manager includes work areas and granular access controls so your team members can collaborate more effectively.

Main Features of Google Tag Manager

Google Tag Manager is packed with features to make tag management easier. Here are some particularly useful ones.

  • Its tagging technology gives you full control over how tags are defined and triggered on your site. It supports Accelerated Mobile Pages and mobile apps and includes features such as asynchronous tag loading and tag pausing, exclusion, and sequencing.

  • It includes multiple solutions to improve usability for marketers, not just IT teams. It features a simple web interface, a preview mode, instant search and auto-complete, version history, work areas, and much more.

  • It allows you to control the level of access for each user, so that marketing and web development teams can collaborate more securely and effectively. It supports multiple client accounts and users at the same time and grants permission at the user level.

  • It includes different features to control when and how tags are triggered to collect the required data, such as triggers for automatic events, clicks, custom events, form submissions, page views, and history changes.

  • It has built-in measurement and marketing tag templates, both from Google and third parties, that make it easy to select and implement the most commonly used tags.

  • It integrates with other Google solutions, such as Google Ads or Campaign Manager, to facilitate the management of advertising campaigns.

  • It allows you to manage tags in an automated way and create customized solutions through the Tag Manager API.

How to Set Up Google Tag Manager Step by Step

One of the most interesting features of Google Tag Manager is that it allows you to manage tags in a pre-production environment, so you can test before launching the pixels or tags. Let's take a look at how to do the basic configuration of Google Tag Manager and then we'll will delve into the pre-production environment.

Basic Configuration of Google Tag Manager

  • Go to and create your account. Since it is a Google product, you will need to link it to a Google account.

  • Create a container for the website or application you want to monitor. The container is a piece of code that you will install directly on your site and that, as its name suggests, will "contain" all the tags that you will use for measurement. This allows you to manage tags in a more flexible way than when you had to implement each of them directly in all or part of the web header.

  • You will then be shown a code that you will have to copy and paste into all the pages of your site.

  • After installing the container on your site, go back to your website and click on the Chrome Tag Assistant. You will see a yellow icon, indicating that the container is empty for now.

  • Go to the main Tag Manager screen and click on the option to add a new tag. You can select one of the preconfigured tags or add any other HTML or image tag. For this example, let's assume that you are adding the Universal Analytics tag, as it is usually one of the first to be implemented.

  • Click on Tag Settings, select Universal Analytics, and choose the type of tracking you want, for example "page view" or "event."

  • Select a Google Analytics configuration variable or create a new one.

  • Click on Activation to choose the tag trigger. You can choose one of those already available or click on the + icon to create a new one.

  • Click on the submit button in the right corner of Tag Manager, create the first version of your container and publish it. Done!

Environments in Google Tag Manager

Google Tag Manager environments are used to preview the changes you make to a container in a test environment before publishing them to your site.

Many companies have an established release process with multiple environments, e.g. development, test, and production. Each new version of the website is tested in an environment to check that everything is working properly before launching the final version online. You can also use the environments feature in Google Tag Manager to test that all the tags in your container are working properly before deploying them. To do this, follow the steps below.

Configure the Test Environment in Google Tag Manager

To get started, go to the administrator view and click Environments. You will see that there are already two default environments: Live (the one used by default) and Latest (the latest version of your container).

To create a new environment, click New, select a name and URL and click Create Environment. Then select Publish Now. The new environment should appear in the Custom Environments list.

Next, go to the environment panel and click on the Actions link. Copy the snippet, paste it into your test website, and save and publish the changes.

Test Your Tags

Once you have created your custom environment, you can create a different version of your container with the tags you want to test. Then, go to the Versions panel and follow these steps.

  • Click on the version you want to publish in the test environment

  • Choose Publish to

  • Select the test environment

  • Click on 'publish'

If you refresh the version panel, you will see that the chosen version has been applied in both the Latest and test environments. Next, go to your test site and check that the tags you included in the container are working correctly. Also check that these tags have not been included in the production or "Live" site.

If something goes wrong, don't worry! As everything is not yet published on your site, you will be able to make the necessary changes to your tags before they are finally launched online.

Publish Your Tags

Once you have verified that the new tags work correctly in the test environment, you are ready to publish them.

To do this, go back into the Versions panel, click on the version you just tested, then click 'publish' and choose the environment. The new version should now be available in all environments. Check that it works correctly and you're done! Remember that if something goes wrong, you can revert to a previous version at any time.

SEM and Google Ads Ebook

Jorge Vergara