Google Tag Manager

Ana Morales

Written by Ana Morales

Google Tag Manager (GTM) is a free tag manager from Google that allows you to install and manage scripts, HTML code or any tracking pixel on your website from one place and without the need to modify the code.

In other words, with GTM you can implement tracking codes or measurement tags from a single platform easily and without technical knowledge or having to resort to developers. This makes it an indispensable tool in digital marketing strategies and web analytics.

Advantages of using Google Tag Manager

Google Tag Manager allows you to perform measurements on your website in a very simplified and faster way. Even so, there are many companies with an online channel that do not know or do not use this tool, having to resort to code insertion for any milestone they need to measure.

For this reason, we recommend using tag management platforms such as Google Tag Manager to all those companies that need to track and measure their website with Google Analytics, install Google Ads conversions or work with tools that require tracking pixels such as Social Ads.

Among its many benefits we highlight:

  • Simplifies the entire process of implementing code to measure or record the tracking of any event.
  • There is no need to have technical knowledge of code or to call on the development team to manage it.
  • Avoid “messing up” your web code, losing lines or accidentally deleting important elements when testing. All this is done from the same Google Tag Manager platform, which then sends this information to the web in a simple and secure way.
  • Keeps an orderly control of all implemented measurement tags.
  • GTM integrates seamlessly with other tools in the Google suite, such as Google Analytics or Google Ads, as well as other third-party tools.
  • Although GTM has many default templates and tags for easy application, we can also add custom HTML or JavaScript tags for more complex implementations.
  • GTM offers a code visualization and version control option for checking and testing before publishing changes.

In summary, GTM is an indispensable tool that simplifies and improves the measurement processes necessary to keep track of digital channels.

What is a Google Tag Manager container?

Once you have created a Google Tag Manager account, the next step is to create and configure a container.

A container is a space within your GTM account where all the tracking tags you apply to your website will be added. Companies usually have a Google Tag Manager account and within it the necessary containers. It is normal to have a container for each website or mobile application.

Each container contains a unique ID included in the installation script that must be entered into the website code.

Create container in GTM

How to install Google Tag Manager on your website?

To start working with Google Tag Manager and install it correctly on your website you must follow a series of steps:

  • If you have not already done so, create an account at from your Google profile. Fill in the fields about your website and select the type of container (if it is for your website, select “Website”).

GTM account setup

  • Once completed, you will be able to access your container and workspace. The first time you will see the script code that you will have to insert in your Web or App. If it does not appear or you prefer to postpone this step, you can find it at Administrator > Install Google Tag Manager. As indicated in the instructions, you have to paste the first block of code inside the section <head> and the second code block after the tag <body>. Be sure to include it on every page of your website.

Install GTM

By installing the Google Tag Manager code, it is no longer necessary to have the Google Anaytics gtag.js script. If you already had it implemented, remove it once you complete the installation of Google Tag Manager. Maintaining both scripts can lead to multiple installation problems and affect the data in the reports.

Implementing the Google Analytics 4 tracking tag in GTM

As we have indicated, Google Tag Manager is nothing more than a tool to configure tags from one place. Therefore, to start sending web traffic data to GA4, you must create the GA4 configuration tag in the Tag Manager container.

  • Within your container workspace, select Tags and create a new one. Click on “Settings” and in the list of tag types, select Google Tag (the old Google Analytics: GA4 settings).
  • You will need the measurement ID of your Google Analytics property’s data stream which you will need to include in the “Measurement ID” box. To locate it, within your GA4 property manager, select Data Flows, click on Web Flow and copy the measurement ID (G-XXXXXXXXXXXXXXXXXX). Include it in the appropriate box.
  • Then select an activator. In this case it will be All pages.
  • Give it a descriptive name, for example, “GA4 Configuration” and click Save.


  • Once you have created the GA4 configuration tag, you can add the event tags needed to measure your website. You can use the Google Analytics “GA4 event” tag for this, which will be linked to the above configuration tag.

Create event GA4

Verify that Google Tag Manager has been installed correctly.

You can use the Google Tag Assistant extension to check that Google Tag Manager and the Google Analytics 4 tracking tag have been installed correctly on your website.

Google Tag Assistant

With this browser extension you will be able to see which Google tags are active on any web page. Once installed, navigate to your website and click on the extension. Click Enable and refresh the page. If you have installed it correctly, you will see a tag that refers to the Google Tag Manager container and another one for the Google Analytics property. Other tags related to Google Ads may also appear. Look at their colors. If it is in green, the installation is correct; in blue, it has some improvement or the installation is not standard (but it is correct). On the other hand, if the label is yellow or red, it indicates an error in the installation that you should check.

Tag Analysis

How does Google Tag Manager work?

As we have seen, the main advantage of using Google Tag Manager is that you don’t need to have much knowledge of development or programming to implement it.

Even so, to understand the tool and work better with it, it is important to know these three elements:

GTM elements


The tags are in charge of collecting and sending tracking data to the different associated platforms such as Google Analytics, Google Ads, Meta etc. That is to say, through the tags we will measure and monitor the visits to the website, conversions, clicks, etc. GTM allows you to create and manage these tags without the need to touch code.

Some examples of tags can be GA4 events, LinkedIn Insights, Google Ads conversion tracking….


Triggers are the instructions that indicate when a tag should be triggered. By selecting the appropriate trigger and adding conditions, you can decide when the configured tag should be triggered. In case of non-compliance, the label will not be activated.

Some basic triggers are: page views, form submission, link clicks, custom events, element visibility, Youtube video….


Variables are the values to be used in both triggers (in the form of a condition) and labels (to capture the required information in the form of parameters).

Some examples of variables are: Page URL, click classes, Click URL, Click Text, Form ID, Video Title…

Once you are familiar with this powerful tool and its basic elements, you can start creating the different events to measure your website and keep track of them in Google Analytics. Remember that you can create the different tags and check their implementation in the Preview option. Once you have completed and tested a new implementation, remember to Publish the container to register the new changes.

In short, Google Tag Manager is an essential tool to measure and keep track of your website without complicating your life with the insertion of scripts and tracking codes on your website. You should consider using them if you want to carry out a correct analysis of the performance of your website and the digital marketing actions you carry out.

If you need help to implement Google Analytics with Google Tag Manager, you can contact us. Our web analytics team will help you to install and configure it on your website.

  •  | 
  • Last modified on
Ana Morales
Ana Morales
Web analyst at Human Level. Graduated in Marketing and Market Research with a postgraduate degree in Big Data Marketing. Specialist in Growth Marketing and web analytics.

What do you think? Leave a comment

Just in case, your email will not be shown ;)

Related Posts