Do you want to track what people are doing on your website but you are not a programmer? Does altering the code of your website makes you a bit nervous? You came to the right place. You might already have a vague understanding of what Google Tag Manager is, or even how it works. In this article, I will explain what GTM is and why it’s the only tag management tool you need.
What is Google Tag Manager?
As the name suggests GTM is a tag management tool by Google. It solves a simple problem for marketers. You might want to install tracking on your website to track the success of your campaigns, track the sources your users came from, or what they are doing on our website.
To do this we need to install Javascript tracking scripts also called “marketing tags”. Without GTM you go into your code editor and paste the tracking code and customize it. You can imagine that once you install many tags, for example, the Facebook pixel or a Google Ads tag, it is easy to lose the overview of how many tags you have installed and what they are doing.
Enter, Google Tag Manager. With the tool, you only have to install one code snippet under the “< head > tag” of your page and that is it. No more messing around with the code of your website. From there on out you can deploy your tags through the graphical user interface of GTM. Once it is set up it will deploy your tags to your site in the background.
The advantages of GTM
- No need to access the code of your website when placing a new tag
- It makes your website load faster because of asynchronous loading
- An intuitive display to set up your tags
- Debugging and previewing your tags without affecting your reports
- A version control system to keep track of the changes you made
- Easy to transfer your tagging setup if managing many sites
Once you get the hang of it the tool is quite easy to use. First, you need to understand what GTM is made up of, containers, tags, triggers, and variables. We will go through them one by one.
What is a GTM container?
When you set up your GTM account you need to install the container tag on your website. That will be the only tag on your website. The container tag, as the name already suggests, contains all the tags, triggers, and variables that you want to deploy on the website. Like with any other Google product you can change user access settings. But a great unique feature of the container is that you can export it, or even better import one that you, or someone else, made before. This makes it very easy to transfer your setup to another site without having to duplicate tags.
How are tags used in GTM?
Tracking tags come in all shapes and sizes nowadays. You have your Google Ads tag, the Meta pixel, the Linkedin Insight tag and the list goes on. To make management easier you can bundle them all in the GTM container tag and keep the code of your website clean.
The function of a marketing tag is to transfer data captured on your website to a reporting or processing endpoint like Google analytics or your Meta ads manager. They can contain all kinds of information about actions that the user completed on your website. You can imagine so, that data accuracy and completeness are very important to give you a good understanding of how your users use your website. Also, machine learning in advertising platforms like Google Ads and Facebook ads depend on this data for finding new and interested customers for you.
To make your life easier Google provided us with the most commonly used tags inside the interface of GTM. You can use these to set up the marketing tags that you want to use on your website. If these tags don’t fit your needs, a custom HTML tag is also available to you. This allows you to fire any custom script on your website.
Be sure to check out the Community template gallery for containers and tags made by others. This will give you an idea of what is possible with GTM and provide you with an easy solution for your tracking needs.
What does a trigger do in GTM?
So how do you activate the right tag at the right time? That is right, with a trigger. GTM has a range of predefined triggers that you can choose from. For example, most configuration tags, like the one to install Google Analytics, you set to fire on a page view trigger. This means that every time a user views a page, and so triggers a page view event, the configuration tag will is fired. Other examples of possible triggers are:
- Link clicks
- Form submission
- Element visibility
- Scroll depth
- Video interactions
- And custom event triggers
You can even combine triggers to create very specific circumstances which fire your tags. So the possibilities for collecting specific data about events on your website are endless.
What can you do with variables?
So, what kind of data can you actually collect and send with your marketing tags? Every element of your website, its name, the URL, or any other characteristic can be sent over as a variable. These variables can then be picked up by your reporting tool and populate your reports with all kinds of details about the fired website event. For this Google has defined build-in variables for us like Page URL, which lets you know on which URL the event was fired. Other examples of build-in variables are:
- The triggered event name
- The clicked URL
- The name of a form
- A video title
- The percentage of videos watched
- Scroll depth
- On-screen duration of an element
Besides all the built-in variables you also have to option to define variables yourself with the user-defined variables. If you have set up and connected all tags, triggers, and variables in your GTM container you are almost ready to start tracking your website.
Is it working? Debugging GTM
So you have everything set up. How do you know that everything works, without messing up the data in your reports? GTM has a built-in feature for this called the debug and preview mode. The mode allows you to browse the site where your container is implemented as if the current container draft was deployed. This way you can test all the edits you have made and see if your tags are firing as you intended them to.
Once you have verified that your setup is correct you need to publish your container to start tracking. This is an important step, which in the beginning, is easy to forget. When publishing it, you will be asked to name your version. That is because GTM also includes a version control system. This is a very handy feature because it allows you to keep track of all the changes that you have made. So, when you have made a mistake you can always find out what it was and reverse it. Believe me, this can save you hours of testing your setup and trying to figure out where you made a mistake. So you have published your GTM container and you can now start analyzing your users. Oh and, don’t forget to sing your favorite song.
Now you
In this article, I have explained the theory of Google Tag Manager. The reality is of course, that working with a tool like this requires practical experience. So, I would like to challenge you to set up a GTM account today and start experimenting with your website. Remember, as long as you don’t publish anything, nothing can go wrong. Once you get the hang of it, it is not as difficult as it may seem in the beginning.
Finally, if you ever need help with your Google Tag Manager or your website analytics in general, don’t hesitate to contact us. We are here to help.