Google Merchant Center

How to setup your Google Tag Manager for Success in 2021

Google Tag Manager out of the box it’s a powerful tool, but you can go to the next level and follow the tips & tricks in this article to get even more out of it!

How to setup your Google Tag Manager for Success in 2021

Google Tag Manager is one of the most versatile tools a business can use for it’s website. It allows you to simply manage and deploy codes on your website without the need of advanced technical skills. Actually it’s so simple anyone can do it!

This is the reason I started a whole series about GTM, you can check it out by visiting the GTM series of articles and by checking out this YouTube playlist!

Although easy to use GTM has to be properly set up and used to yield the best results. Follow the steps below to enhance your knowledge of GTM and set up your account for success in 2021! 

Configure Built-In Variables

I honestly can’t remember how many times I needed to implement a tracking architecture FAST and forgot to configure built-in variables and I had to come back to do this after I saw that something wasn’t registering well.

One of the first things you should do after you create an account is to go and configure your required built-in variables. What are the variables that you require? Well… as with many things your website and specific situation will dictate what variables you will need to configure. I will tell you about some of the most important that I recommend configuring right off the bat.

If you are not acquainted with the definition of variables, please do read my GTM terminology article before. It will help you get a better grasp on the term and ensure you will get the maximum out of this article.

How to configure built-in variables

First you will have to navigate to Variables from your GTM interface, from this screen click the “Configure” button in the upper-right corner of the “Built-In Variables” screen.

After you click the button an open will open, giving you multiple options of configurable built-in variables. In order to configure any of them simply click in the checkbox and the variable will be configured. 

Each of the variables in the list has it’s proposes and can be used in many ways in different implementations. I will give you some pointers about four categories of built-in variables.

Clicks Built-In Variables

Those variables let you record different values for each of its underlying variables, like: 

  • Click Classes (the class of the clicked element)
  • Click ID (the id of the clicked element)
  • Click URL (the clicked URL, if any)

This is probably one of the most important variables you can leverage to improve your tracking game (AKA. setting up good triggers for your tags). A click variable registers a specific information about a user’s click. 

I.e. Let’s say you have a pop-up form on your website with a “Subscribe” button and you want to track everytime someone clicks it. With those variables configured you will be able to see what GTM records when this click is made and you will be able to record them. You might be able to see that the “Click text” is “Subscribe”, now you will be able to set a trigger with this particular configuration (as shown below).

Forms Built-In Variables

If you have any forms on your website, it’s a clear sign that you should think about configuring these variables as well. They will be registered whenever GTM registered a form has been submitted. 

Note: Keep in mind that forms do come in all shapes and sizes and due to technical limitations some forms might not function well with GTM.

You will see that the types of form built-in variables are pretty similar with the click ones, thus I won’t go through them once again.

Video Built-In Variables

If you do use videos in your website pages or articles it’s a good idea to configure video variables as well. Those are different compared with what we’ve seen above. They allow you to register other information like video: provider, title, duration and even percent. 

The information gathered by those variables can be pretty lucrative and can offer you insights about how users interact with your video content and how engaged they are. Those insights can help you take better website design or content decisions.

Scrolling Built-In Variables

This is quite an interesting set of variables, their main purpose is to help you understand how engaged your audience is with the website. They do this by recording when the user reaches a specific threshold via the page scroll. 

You can define specific thresholds, like 20%, 50% or else to better understand and report on how much of your pages content people actually get to see.

Create and use a naming convention for your tags

One of the most important things in any business is organization. Being able to organize your work can dramatically improve efficiency and the final result. Thus I cannot stress how important this step is. Having a naming convention for your tags is crucial! 

Of course I do understand that if you are a small business with just a few tags in your GTM account this might seem an exaggeration, but things tend to get out of control rather quickly when it comes to the volume of tags, this better be safe than sorry. 

A naming convention is basically a standardized way to name your GTM tags, triggers and variables. It helps you stay organized and find the searched items faster.

You can develop your own naming convention (actually, I do recommend this way), but I will share with you my own recipe that I use. 

Template name convention for tags: {Service Name} – {Description}

For service names I always go for abbreviations: Google Analytics is GA, Google Ads is G Ads, Facebook is FB, and so on. 

When it comes to description I tend to keep it simple and to the point. For example if I need to track whenever users end up on a /success page, I give the name Success Page to the tag description. 

Combining the two components of the name would give you: G Ads – Success Page or FB – Succes Page. 

It is a simple way to keep your account tidy and simple to search and I cannot recommend it enough!

Start using folders

If we are at the subject of organizing our GTM account it’s a good moment to talk about folders.

Folders are groupings of tags, triggers and variables. You can think of themes as Windows / mac os folders, which allow you to organize files by different criterions. 

The way you organize your GTM assets is completely up to you, two of the most common ways of organizing assets is by function and type. 

For example, you could gather all Google Analytics related tags, triggers and variables under one single folder with the same name. This is an example of organization by type. 

Alternatively you could gather all fundamental codes, or base codes as defined above, under one single folder named Base Assets, this is an example of functional arrangement. 

To discover the best organization type for your business, start by analyzing the existing assets and the way you are using them, maybe an organization by team / responsible would better fit your needs. As with most things with GTM and programming there is no one size fits all, if you are not sure what is the best way of organizing start testing and stick with the best version.

Always Preview your tags before deployment!

A bad code implementation can affect your website in different ways, the worst of which is making it inaccessible, and we already know you don’t want that. 

In order to avoid any such situations I do recommend you to check your tags before deployment using the built-in feature of GTM called Preview mode. This mode is sort of a sandbox mode in which you are shown a version of your website in which all the tags in your account are live, although no code was actually deployed in your website. Or as Google puts it “Google Tag Manager’s Preview Mode allows you to browse a site on which your container code is implemented as if the current container draft was deployed, so that you can test a container configuration before it is published.

The interface of the preview tool changed in the last part of 2020, so if you are used to seeing it in the lower part of your screen, it’s now in a new tab browser. This comes with some added benefits, like keeping the history of the visited pages and it’s something you will have to get used in 2021. 

I will add a future article and video in the future about how to use the new interface of the preview mode.

This tool can be used in parallel with tools like: Google Tag Assistant and Chrome DevTools to debug any potential issues.

Use templates when available

Templates simply make your life earlier by giving you a framework for your implementation. They are sort of guides that help you implement code properly via Google Tag Manager. 

The major advantage of using templates is that it makes it possible to write custom tags and variables in a safer, more efficient manner than when using custom HTML tags and custom JavaScript variables (Google).

There are plenty of templates out there and you can see all of them by accessing the community template gallery

I will make a complete guide in the future on how to deploy Cookiebot with GTM and make sure your implementation is GDPR compliant, but if you want to start using templates today you can simply log into your GTM account and from the navigation menu select “Templates”.

Another major advantage of templates is that you can create custom templates for your organization and share it internally. In order to create a custom template for Tags or Variables you can navigate to Templates and click New to the corresponding template type.

Note: Keep in mind that using templates means injecting scripts into your website, which can be a potential security issue. Always make sure you check the templates you want to use before starting to use them!

If you want to skip the whole learning process and just want to get the job done with GTM we can have a chat. I have used GTM in dozens of implementations and I can help you properly set up your account and setup tracking!

If you want to skip the whole learning process and just want to get the job done with GTM we can have a chat. I have used GTM in dozens of implementations and I can help you properly set up your account and setup tracking!
Andrei Oancea

Share
Published by
Andrei Oancea