006 Google Tag Manager: Why You Should Learn It

You’ve probably heard of Google Tag Manager before. You’re curious and you want to know if you really need to learn it. In this episode, Slobodan Manic takes us through the why and the how of Google Tag Manager. Even if you’re a non-technical marketer, Google Tag Manager can help make your life easier. This episode will help you get started.

Links in this episode:

Episode Notes:

Google Tag Manager (GTM) is a free tool that allows you to manage and deploy marketing tags on your website without having to touch your website’s code.

When Do You Use Google Tag Manager?

Here are some use cases:

I feel like if we focus on any specific tag, or use-case, it might send the message that Google Tag Manager is a specialized tool for that one thing. But in reality, it is a completely different story. Whatever it is that you need to throw at your website, you can use Google Tag Manager to do it. 

Could be any third-party tag, of course, but also if you need to send any information from your website to those tags – you can either use the data layer to do have your website send the information to Google Tag Manager, OR you can write some custom JavaScript code directly in Google Tag Manager UI to read the information directly from the page. 

The Old Way of Deploying Tags

So if I wanted to add Hotjar or ad conversion tag on my website, what I’d do is copy the javascript and say “hey developer, can you please add this to these webpages.” You’re lucky if you get an immediate response but more often than not, you’ll have to wait for the next release cycle before getting this done. But if you have to launch a big ad campaign and pressed for revenue targets, you can’t really wait that long.

With GTM, you don’t have to wait for the next deployment. As a marketer, this is the biggest benefit of using GTM. It speeds up the launch time and deployment when ready. 

Why Use Google Tag Manager?

Their tagline is “Easy to use. Easy to Launch.” and that really sums what Google Tag Manager is about. 

I’ll go through the main benefits listed on GTM landing page, and just quickly comment on each one:

Increase your agility – This is exactly what you just talked about, it’s less than ideal when deployment of marketing tags depends on your website’s deployment cycle, many times you will need to move much faster. Google Tag Manager gives you the opportunity to do just that, by separating codebase from marketing tags.

Put your mind at ease – Now, when you have a non-developer adding code to a website, this is when things can go wrong. If your tag has a JavaScript error it could completely break functionality of the website. Or, if you have a slow tag, it could seriously hurt the performance of your website – see how I was able to talk about performance again? 

With Google Tag Manager you don’t need to worry about these things, and neither does your developer. You just cannot publish bad code in any of your tags, because Google Tag Manager has built-in error checking, and also the tags are loaded asynchronously

Collaborate across your organization – You can have multiple workspaces, granulated access to each user, publish history and even multi-environment testing

Deploy Google and third-party tags – This is probably the one that will make life so much easier for a lot of people, there are templates for any tag you may want to deploy, for example, if you are adding Hotjar snippet to your website, all you need to enter is Hotjar site ID, the rest of the tag is handled by Google Tag Manager. And that may seem like no big deal today, but what if Hotjar snippet is changed in the future? You will not need to update every website you’re working if the tag is deployed through Google Tag Manager, since the built-in template will be updated to reflect the changes.

 

How Google Tag Manager Works

You have one tag that you add to your website – Google Tag Manager container snippet. That tag does nothing on its own. But you then go to Google Tag Manager website and add the other tags there. 

So it’s one tag that loads all other tags, the explanation can’t really be any more simple than that. There are many other things happening in the background – like triggers that determine when a tag should be loaded – but if you’re looking at the front-end of your website, there’s this one snippet of code that just loads all the other snippets of code, and it’s so clean and so beautiful.

 

Google Analytics vs Google Tag Manager

Let’s talk about similarities and differences between Google Analytics and Google Tag Manager, since that seems to be confusing quite often.

  • Similarities – They are both Google’s products.
  • Differences – Everything else.

We talked about all those different tags you can have in Google Tag Manager. Google Analytics is one of those tags. Probably the one most people will use, because if you are using Google Tag Manager, you probably already use Google Analytics and through Google Tag Manager is really the best way to deploy Google Analytics, but if your task is to set things up in Google Tag Manager you don’t necessarily need to be familiar with Google Analytics.

You probably will be, but it’s absolutely not necessary.

 

How To Get Started with Google Tag Manager

This podcast is all about getting started with Google Tag Manager and trying to explain some of its key components to our audience. If you’re someone who keeps hearing about Google Tag Manager at work constantly, but never really jumped on it – I hope this following segment helps you.

 

Now that you know what Google Tag Manager is, how it works, all that, it’s time to look at its four components. I’ll just mention all four now, then let’s talk about each one in more detail.

 

Tags – triggers – variables – data layer. 


Tags

Let’s start with tags. Most of our listeners will probably be familiar with tags and know what they are – snippets of code provided by analytics, marketing, support vendors and so on, that help you integrate their services into your website. 

In Google Tag Manager there are many built-in tag templates, to make adding of these tags to your website even easier. If you need to add a tag to your website, it’s very likely it already exists as a template in Google Tag Manager, either as a built-in tag configuration, or one you’d find in Community Template Gallery. So more likely than not, you can use GTM UI to add a tag, and just configure it instead of copy-pasting the entire tag. But if you can’t find the tag you need, you can just use the custom HTML tag, which is a native Google Tag Manager tag type and paste your code.

Triggers

Next up, we have triggers. Just adding a tag will do nothing, since it needs a rule that determines when it should fire. Triggers are those rules. And, of course, there are many different types of triggers you can use. 

If you need to fire a tag, like Google Analytics base tag, to track pageviews, you would use one of the page view triggers. If you want to register an event, like a user clicking a link, or submitting a form, there are triggers for that as well. Or if you want to listen to custom events that your website sends through the data layer, yes, there are triggers for that as well.

Variables

In both tags and triggers you will often use variables. A variable is just a placeholder for some value. There are many built-in variables, for example, for URL of current page, or text from a link someone has clicked, but you can also define your own variables and give them any value you can think of.

Data Layer

And finally, the data layer. If you’re not familiar with Google Tag Manager, this is the most difficult concept to understand, but once you do it will be worth it. Let me try to explain what it is and what it does, in non-technical terms.

The name is great, because it’s self-explanatory – it is a layer of data that sits between your website and Google Tag Manager. It is a JavaScript object that your website defines, and Google Tag Manager will listen to any changes to that object. 

If you add a new value to the data layer object, Google Tag Manager will figure out something happened. This is called “the data layer push”, because you’re pushing a new value into the data layer. Anything you push into the data layer object becomes available to you in Google Tag Manager as a data layer variable. And if one of the values you push has a key called event, this also becomes available as a “custom event trigger” in Google Tag Manager. So you can set up GTM triggers that fire when your website does something.

Without the data layer you can already read everything from the page, but this is far from ideal. What if your template changes? Then if you were reading text from a certain H1 tag, and now this is not an H1, or needs a different CSS selector, you can no longer get that value. And what if the value you need is not shown in the page? Then you really need your website to push that value to the data layer so you can use it in Google Tag Manager. 

 

Using Google Tag Manager for Event Tracking

Let’s say you want to track add to cart events in Google Analytics. First you need your website to push an event to the data layer when a product is added to cart, with some extra values. Maybe product name, quantity, price and so on. And let’s say you name this event you push to the data layer add_to_cart.

Then you’d set up a custom event trigger in Google Tag Manager and make it a custom event trigger and set the event name to add_to_cart, so it matches what your website pushed to the data layer. You can also set up data layer variables for all the additional values you pushed to the data layer, because we will need those for the tag.

Then, if you are working with a basic Google Analytics event you add a GA tag, set its tracking type to event and choose what your event category, action, label and value will be. And let’s say event category is products, event action is add to cart, label is product name which you pull from the variable you just created and value is the price of a product, also available as a Google Tag Manager variable, since you pushed it to the data layer with the event. That’s your basic Google Analytics event.

But the beauty of Google Tag Manager is that you can reuse everything. If you now want to set up a Facebook Pixel add to cart event, or a Snapchat Pixel add to cart, you would be able to use the same trigger you set up for Google Analytics, and the same variables for product name or price, but the tag would be different. That can save you a lot of time.

Google Tag Manager and Site Performance

Anything you add to your website can impact performance. Only add things that you need and you get value from, this goes for Google Tag Manager or anything else. That said, Google Tag Manager does load all of your tags in a good way – asynchronously – which means any individual tag, including Google Tag Manager snippet, will not block loading of the page or other tags as it loads. That doesn’t mean the page won’t get bloated if you add too many tags, just that they are loaded in a good way.

If there’s a real downside it’s that it get really easy to add stuff to your website, often without supervision of people in charge of it performing well. Just don’t go crazy with it, and remember that when it comes to performance, loading tags through Google Tag Manager is not worse than adding them directly to your template files, and in most cases it’s better.

What To Do With Old Tags?

I would say the answer to that question is almost always going to be yes, and I’ll go back to my favourite way to answer when someone asks me if they should use Google Tag Manager, and the answer to that one is “unless you know what your reason is to not use it – then yes, you should”.

Any Downside?

Really hard to think of any, for most people. Perhaps the fact that there’s no dedicated support, on free version of it, but that’s what you’d expect. Or maybe you just need a more robust or specialized tag management solution. But if that’s the case, you’d know it already.

Do I need Technical Knowledge to Set-up Tags?

To get started, no, not at all. Sure, if you need a complex setup, with data layer integration, or some custom variables, you need to have the basic knowledge of JavaScript. But if you want to set up a Google Analytics tag and set it to load on every page view, absolutely not.

Final Thoughts and Recap

In this episode we’re trying to help people get started with it, so I’d say do just that – start. You don’t even need to add Google Tag Manager container snippet to your website, just create a container and get familiar with three of the four components we talked about today – tags, triggers and variables. You don’t need anyone to help you with that and you can’t break anything.

If you go to YouTube and search “Beyond the Launch Google Tag Manager” you should be able to find it. Beyond the Launch is the name of the channel, and the video is obviously all about Google Tag Manager.

Finally, check out Google Tag Manager Fundamentals course if you want to take a deeper dive in Google Tag Manager UI


Don’t forget to subscribe to the No Hacks Marketing Podcast. And if you learned something new today, we would appreciate it if you can leave us a review on your favorite podcast platform