May 7th 2021

Google Tag Manager Basics (Part 1/2)

Digital marketing feeds on data. It is essential to know the Internet users that interact with your website. This is true regardless of the type of site including ecommerce, a personal website, a small or middle sized company website or a site for a multinational company.  

Google Analytics can provide you with some important information, but if you only use their data you will realize quickly that there are many limitations. However, if you use Google Tag Manager, you will have more possibilities available compared to relying solely on Google Analytics.

Tags are small end codes that you can add to your site to get information about how Internet users navigate through your site. The tags track their interactions on the website such as downloading documents, filling in forms, and clicks on a specific link to help create heat maps and future remarketing efforts, etc. 

Most websites use many tags. Adding and removing a specific code for each tag on a day-to-day basis can quickly prove to be time consuming particularly for software developers that have many other things to do. Tag managers such as Google Tag or Segment can help you to avoid this problem and allow you to add, remove, or set tags with a unified web interface without modifying your website source code.

Google Tag Manager (GTM) may simply be a free product from Google, but it is not only for installing Google Analytics or Google AdWords tags. It can also be used to install tags for other services such as Twitter, Hotjar or AB Tasty. If a tag is not included in the previous list, you can add it via a code that you have written yourself. However, please be aware that some kinds of tags are not supported by GTM and thus, they will not function together.  

The Advantages and Disadvantages of Google Tag Manager

Reducing the Need for Help from Software Developers

The most significant benefit of GTM as with all tag managers is that it allows marketing staff to implement tag tracking without assistance from software developers. They often have better things to do than help you to code five lines on your website. In addition, some conversion tags and tracking tags are only useful for the duration of a specific marketing campaign. As you get to know GTM, you will see that you can add and remove tags in just a few clicks.

Despite Being User-friendly, GTM Remains a Technical Tool

Despite that GTM requires substantially less involvement from software developers, this tool does not eliminate 100% of their involvement. You will still need to install the GTM software and add it to all of the pages of your website. Also, once you add the GTM vehicle to your website, you will need to remove all previously installed tags to avoid tracking everything twice. Finally, some tags as well as specific and advanced elements of GTM will require basic HTML/CSS and JavaScript knowledge.

Most Companies Benefit from Using Google Tag Manager

Google Tag Manager can be useful for your company whether you own a small company or a multinational.  If you have a middle sized or small company, you most likely don’t have access to a lot of IT services.  In this way, GTM could help you save time. If you have a big company, you can also save time tracking all of your marketing campaigns with GTM. Your website will operate faster asynchronously loading the tags that you need. 

Some Tags May Reduce Your Web Page Load Speed

Historically, tracking tags synchronous load onto a website. This can temporarily stall the loading process of the web page. The longer a web page needs to load, the greater the chances an Internet user will be likely to leave the page. Luckily, GTM tags load asynchronously by default. This means that they do not stall the loading process of other elements on the web page.

Google Tag Manager Can Also be Used for AMP Pages and Mobile Applications

GTM is not only for traditional websites. There are containers for AMP and mobile applications. It is particularly useful for mobile applications as GTM allows you to update tracking without the obligation to update your application via an app store. In this guide, we will only cover GTM for websites.

Tag Components and Google Tag Manager

GTM is completely user-friendly, but before you begin there is some precise jargon to learn.


As you begin using GTM, the first thing to do is to create a container. A container “contains” all of the tags for a specific website.

Upon creating an equipped container, GTM will provide a few lines of code to add to your website. You will need to add them to all of the pages of your website. Some CMS platforms like WordPress or Ghost have plugins or options to add the code without accessing the source code of your website. Once the container code is added, you can then add, edit, temporarily suspend or remove GTM tags.


On each site, each tag should serve an individual purpose. You would most certainly want a tag to send information when a document is downloaded by an Internet user or if they fill in a contact form. These types of actions are called triggers in GTM. Each tag must be associated with at least one trigger or it will never function. 

Triggers may also be made up of two components: events and filters. As you configure a GTM trigger, you have a long list of already established trigger types from which you may select one. These are events and once selected, you can set up a filter.

Filters can also be divided into three categories: variables, operators, and values. We will discuss variables later in this article, for now, remember that a variable is a type of datum.

The operator configures the tag trigger if the chosen variable is equal or greater or less, contains a text, a value, etc. Yes, the last component of a trigger, the value is simply the value at which you assess your variable. This value could be a chain of characters, a price, a numerical value, a URL, etc.

The explanation definitely seems complicated. In this way, we will look at another example together. Imagine that you would like a tag trigger to know if Internet users read your blog. You would need to create a tag with a trigger that takes into account how “deeply” each Internet user scrolls down the page. If an Internet user scrolls more than 75% of the way down the page, you would set up the tag to trigger. In addition, the tag must only trigger on the blog pages of your website.

If you were to configure this trigger, you would select event “all pages”, add a filter with a variable such as the scrolling depth, an above or equal to, and finally 75% as the value. It is necessary to add a second filter with the page URL variable such as the operator and finally as a value the root URL for your blog, typically the name of the website (

There will also be times when you will want to block a tag. In this case, you can create a “block” trigger. These types of triggers cancel out usual triggers. If you configure a tag on all of the pages of your website with a trigger to block specific pages for example, the trigger tag will affect the other pages.    

Variables and Constants

While tags depend on triggers, the triggers depend on variables. The variables have the value that the trigger takes into account to know if it should trigger the tag or not. The tag compares the value of the variable to the value defined by the trigger. If the set condition is true, the tag is triggered.

Tags also use these variables to collect information on the Internet via the data layer. A typical example of using the data layer is the number of items added to checkout by an Internet user on an ecommerce website.

These variables can be reused frequently with multiple tags. A common example that is particularly useful is to put IDs and tracking codes for specific tools in the “constant” variables to reuse them. Furthermore, imagine that you need to trigger many different Google Analytics tags. Instead of systematically adding your Google Analytics ID each time, you can store it in a variable.

In GTM, there are two fundamental types of variables, those that are GTM integrated and others that you need to define. The variables that are integrated into GTM are the most commonly used. In this way, Google is ahead and makes these variables available to you without the inconvenience of defining them.

When you select this type of variable, Google Tag Manager will offer to customize it. Know that there are other variables available by clicking “Configure”. You will also have access to additional variables if you use GTM for a mobile app or an AMP page.

If you need a variable that is not GTM integrated, you can create it. You would need to choose from a list of predefined variables in GTM and then change the parameters. 

Variables can also be created from the GTM homepage by clicking on the “Variables” table in the left menu. You can also create a variable as you set up a tag by clicking on the Lego shaped logo that has a plus sign.  

Data Layer

Tags must regularly gather additional information from the Internet whether they are triggered or not. In the second case, it is easiest to obtain information from the HTML of a website. However, it is not possible to customize the source code for your website. 

In response to this problem and managing Internet user information, you can utilize the data layer. It is a list of objects in JavaScript that stores information separately from your website code. Your tags can go into the data layer and have an exact place to find information.

Technically, the data layer is an optional component of GTM. It is the most technology-based aspect of Google Tag Manager and is often ignored by people in marketing that are not tech-savvy. Nevertheless, it is a very powerful tool.

If you would like to use it, you can initiate it (with your customized data) at the top of your page as mentioned below, before the GTM container code.

If you do not do it, know that GTM will initialize an empty one in any case. Once it is put into place, you can add the data in the objective via your website code or via specific GTM triggers, like when an Internet user adds merchandise to their shopping cart.