Introduction to Google Tag Manager: The Basics

When you integrate external services to your website to measure its performance or that of the advertising campaigns that you have launched, you generally have to juggle a large number of code snippets.

This requires, in addition to a certain programming know-how, a good overview. If it is not possible to access the code base directly, you must communicate with the responsible programmer each time that new analysis and monitoring services are implemented.

To counter this, Google released years ago the Google Tag Manager which greatly simplifies the integration of different codes.


  1. What is Google Tag Manager?
  2. How exactly does Google Tag Manager work?
  3. Tags, triggers and variables: the basic components of Google Tag Manager
  4. Integrating code snippets with Google Tag Manager: the advantages
  5. Tutorial: using Google Tag Manager for your personal web project

What is Google Tag Manager?

Google launched in October 2012 its internal management system for the integration and administration of JavaScript and HTML tags.

While the first version was mainly designed for the solutions developed by Google, namely Analytics, AdWords and DoubleClick, the tag manager supports an increasing number of third-party tags since version 2 (2014), thanks in particular to the release of the official API.

Google Tag Manager is not limited to the implementation of analysis and conversion tools: Remarketing and Affiliate tags as well as test tool snippets such as AB Tasty or Mouseflow (Heatmap tool) can also be integrated into your project (websites and mobile applications) using Google Tag Manager.


You will find the official list of supported tags in the Tag Manager Help forum.

How exactly does Google Tag Manager work?

Well Google Tag Manager is  used to connect a website or an app with tools of all kinds  quickly and easily thanks to its tag system.

And these tools can be: web analytics, measurement of digital marketing campaigns (sponsored ads, remarketing …), optimization of the user experience, heat maps, A/B tests, etc.

These are just a few examples of all the tools you can use with tags through Google Tag Manager:

➤ Google Analytics : web analytics tool (the one I have connected in GTM for this blog and I am going to explain how to do it step by step)

➤ Google AdWords : tool to launch sponsored search campaigns in Google searches (SEM), display ads, video ads, mobile apps, etc.

➤  DoubleClick by Google : advanced and very complete tool to manage digital advertising campaigns of all kinds and in detail.

➤  Google Optimize : tool for optimizing the user experience with testing A / B experiments, etc. (I have to try this one!)

All implementations are then done through the web interface from Google Tag Manager. The snippet container functions as a central location from which all the tags that you configure via the browser interface are set up.

Subsequent changes can also be made directly in the Tag Manager. If you never need a tag anymore, just delete it from the container.

Tags, triggers and variables: the basic components of Google Tag Manager

In order for the snippet container to capture the interactions and information desired by the user and transmit it in the correct way, you must create the appropriate tags and triggers in your Google Tag Manager.

Variables can also be used to specify these two basic elements of the Google tool. For the three components, there are different ready-made models, but you can also make your own settings if necessary. Below shows you exactly what the tags, triggers and variables do.


Tags are the units at the heart of Google’s tag manager. They are in the form of code and determine what information is sent to which places.

In principle, tags are nothing more than code snippets that you could include yourself in HTML code. In addition to the standard tags, there are specific JavaScript tags that do not pass information, but fire additional tags.

However, Google Tag Manager generally loads all the tags contained in a container independently of each other and in parallel with the other elements of the website.

An intelligent caching mechanism optimizes the number of requests that the web server must respond to.


In Google Tag Manager, you use triggers to define the conditions under which a particular tag should come into play. More specifically, it is a question of what actions or events the user is driving when a code is executed, that is to say when it is “triggered”.

It can be simple page views, loaded windows or the appearance of error messages, but also clicks of visitors on a specific button.

You can of course also set as a tag trigger the filling of a form, the subscription to a newsletter or the viewing of a video. The same trigger can be used for several tags.


If you want to refine the parameters of the defined tags and triggers, you can use the variables in the tag manager. For tags, variables offer the possibility of entering dynamic values.

If, for example, for an online store, information such as the transfer of purchased products must also be tracked, the variables can be used. It works very similarly with triggers; variables are used to specify them.

While you can define for example exclusively with a trigger that a tag should be executed when a page is called, you can use a variable to specify exactly which page (s) or URL (s) it should be ‘to act.

Integrating code snippets with Google Tag Manager: the advantages

Google Tag Manager is essential for anyone who works with different tracking and analysis tools for various purposes. Here are some of the benefits of Google software:

  • Tag caching minimizes server requirements and shortens the loading time of websites.
  • Source codes are optimized to a minimum.
  • The integration and administration of all tags is easy and convenient via a single web interface after a simple access to the source code.
  • Continued blocking of unwanted snippets or types of snippets increases the security level of your website / web application.
  • Different ready-made templates for tags, variables and triggers are available.
  • Automatic tag verification with preview and debug mode.
  • Record all tag activity and changes to Google Tag Manager account settings.

Tutorial: using Google Tag Manager for your personal web project

How do I use Google’s tag manager for my website or app now? Because the tag manager is web-based, no installation is necessary; you can access the interface via any standard browser.

There are also no user fees, so you can get started right away. The only prerequisite is to have a valid Google account . If you already use services such as AdWords, Gmail or Google Drive, you already have an account, if not, you will have to go to create a Google account to then be able to access Google Tag Manager.

Step 1: Configure your Google Tag Manager account

Go to the Google Tag Manager page and sign in with your Google Account to start setting up the manager . A new menu will open automatically, allowing you to add your Tag Manager account.

To do this, enter the name of the desired account and the country in which you are located. Click on the “Continue” button to confirm the data entered.