The fundamentals of Google Tag Manager

What is a Tag?

A tag in Google Tag Manager is basically a script. They are segments of code that you get from your Google Analytics. A tag is associated with a certain set of goal firing rules and putting the scripts on the page at the appropriate time and firing different things that are required to fire so that the platforms know what’s going on. A tag manager can tell other platforms whether action on the page has converted or not.


A Trigger is a component in Google Tag Manager that helps to identify when should the Tag manager take an action. For example, a trigger can be set up when a pageview occurs, when a video is played, when a conversion occurs etc. There are basically 3 main triggers and they are Pageview triggers, Click Triggers and Engagement style triggers.


A variable in Google Tag Manager is just a piece of information that it needs in order to do its job. For example, a pageview trigger is telling different platforms that somebody is on the page. But, how does it know which page is it? That’s why we require variables. Variables can be more than one associated with the information and it can have different values.

Data Layer in GTM

As you go through the Tag Manager and as different behaviours happen, you should be able to temporarily store those details somewhere so that you can have that information as a reference later. You should be able to store the data long enough so that this information can be sent to different platforms that need to know about these details. Basically, a Data Layer is a component in GTM where you can store details temporarily. There are two parts in the data layer and they are keys and values.

The Preview mode in GTM

The preview mode is Google Tag Manager is a life-saver. The best thing about this feature is that it saves us from making mistakes and messing up things. The Preview option in Google tag manager is a way for you to check and make sure that all of the changes and everything you’ve adjusted in your tag manager implementation can be tested before publishing. You can make sure that it’s working and this mode will also show you the number of changes that you’ve made. You can keep the preview mode turned on as long as you need and you can abandon/delete the changes whenever it is not required. But, whenever you make any changes, clicking on Refresh button is really necessary. Otherwise, the changes will not be updated.

Container Structure in GTM

A container in GTM is something that’s used to measure. Each website will have its own container but it necessary to check the purpose of the container. When you start working with GTM, the first thing that you will need to work with is the Container. A container holds all the tags for your site.

The use of Workspace in GTM

The admin who holds the GTM account has the power to add users and provide certain permissions. So, if there are multiple people in your Tag Manager container and if 2 people are in the container at the same time, it is highly likely that somebody is going to overwrite somebody else’s changes. A workspace in GTM helps to keep those changes separate and siloed so that the changes are not overwritten and if somebody does change something that would affect somebody else’s container, the Tag Manager will alert you and allow you to update everything you’ve been working on of the most recent version.

Tag Sequencing and Formatting Variables

Do you know that there are ways that you can actually control what order the tags fire in? The Google Tag Manager works in an asynchronous way which means that everything sort of fires at the same time when it’s being told to fire. But, you can build an order to sort when the tags will fire. That’s why you need Tag sequencing.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store