The course I will focus on this week is:
Google Tag Manager for Beginners — with Chris Mercer aka ‘Mercer’
Let’s jump right in.
Google Tag Manager for Beginners

I had previously taken Chris Mercer’s Google Analytics for Beginners course, and enjoyed it very much. It really primed me for all his other courses. His extremely organized style of teaching never fails.
So at this point, I’ve got the basics of Google Analytics. Now I’m exploring another Google marketing tool that works alongside it — Google Tag Manager, which I’ll be referring to it as ‘GTM’ from here on.
What does GTM do?
Back in the blog article I wrote about Google Analytics (GA), I shared about the Google marketing ecosystem, which both GA and GTM are a part of.
Briefly speaking, GA does three things — it collects data, stores data, and reports on data.
Now, what can GTM do better than GA? That would be collecting data. More precisely, it can collect specific user behaviour, like scrolling, video plays and time spent on page, based on whatever you train it to do.
Much of what GA is pretty much blind to, GTM can detect with ease. Then it sends that information back to GA, where we get comprehensive reporting of what exactly is happening on our website.
Not only can it report back to Google Analytics — it can also collect and share data with other platforms like Facebook pixel and Google Ads.
The Basics

Setting up GTM is relatively easy. It starts with creating a new account, and a new Container associated with the domain you’d like to track.
Once you create a container, GTM produces a unique tracking number for you (GTM-XXXXX). It also generates a snippet of code which includes that tracking number. This is to be placed as high in the <head> of each page as possible so as not to conflict with other scripts in the <head> section.

There are a few ways to do this. Probably the safest and easiest way, especially for non-developers, is to install the Google Tag Manager for Wordpress Plug-in. It lets you easily paste the GTM code snippet (albeit in the footer section, but it’s ok).

A more advanced way of working with that GTM snippet would be to directly paste it yourself into the theme header section of your wordpress theme. However, I would only recommend this to people who have more developer knowledge.
Once you’ve got the GTM snippet all set up through your chosen method, you can test whether the tag manager is properly set up by installing the Google Tag Assistant.

This gives you the heads up that Google Tag Manager is in fact associated with your domain and is tracking.
The GTM Components
In GTM, we have four main components involved in a workflow:
Tags (the ‘what’)
Triggers (the ‘when’)
Variables (the info GTM needs to do the ‘what’ and ‘when’)
Data Layer (a temporary storage compartment)
Thanks to Mercer’s simple illustration of what each of these components are, it’s quite easy to understand the “moving parts” of GTM and how they relate to one another.
Let’s go into more detail about what each of these components are.
Tags (The ‘What’)

In the most basic sense, a tag is ‘what’ you want GTM to do. When you look through GTM’s list of tags, you’ll see a range of brand names like Google, Facebook, Hotjar and Paypal, plus countless more.
Essentially, these are the platforms which GTM sends data to and informs on what’s happening. Technically speaking, a tag is a script — it’s the code that GTM inserts into your web pages at specific times.
You can select from a list of built-in tags (which is always recommended if it’s available) or you can set up a custom HTML tag.
Triggers (The ‘When’)

If a tag is the ‘what,’ then a trigger is the ‘when’. When do you want the tag to fire? We’re not necessarily talking about a certain time stamp, but more about an action/event that happens, such as a page view, a link click, or video play.
In the list of triggers available, you’ll see there are different types of triggers, like ‘Page View’, ‘Click’, ‘User Engagement’ and ‘Other’. You can create custom triggers as well.
Variables (The info GTM needs to do the ‘what’ and ‘when’)

Variables are the information GTM needs to do what you want to do, when you want to do it. In the image example above, the variables under each trigger are listed in the purple bars: page names, specific videos and actions on that video, and conversion details like price and product. You can enable built-in variables, or set user-defined ones.
Data Layer

The data layer is GTMs most powerful feature, and where a lot of its magic happens. You can think of the DL as a sort of filing cabinet for temporary storage, until it gets sent over to another platform, like Google Analytics. It stores the events taking place and what GTM is doing, in the form of “key”/”value” pairs. The data layer is useful for storing details you’ll want to retrieve later, such as ecommerce transactions. Sending information here is called a “data layer push.”
Preview Mode

One of the brilliant features of GTM is its preview mode, which lets you test and debug the configurations you set.
When you click the ‘preview’ button in GTM, you’ll see a big orange box which indicates you’re in preview mode. What’s important is to click the orange ‘refresh’ button each time you make changes you want to test in the preview/debug panel on your website, plus reload your webpage. Otherwise those changes won’t show up.
When preview mode is active and you are clicked into one of the pages of your website, you’ll see a horizontal panel across the bottom section of the page. This is the debug panel.

Here, you get a summary of all the events happening on the page, (left pane, while clicked into “summary”) That list on the left is all the events taking place at any given point in time, on that specific page.
When you click on any of those events, the right-hand side of the screen refreshes to show you all the details of that particular event. That includes what tags were fired (or not fired), variables enabled, and data layer pushes.

A side note on preview mode — you have to enable 3rd party cookies in your browser in order to access preview mode. This was something I had to troubleshoot while doing the GTM tutorial, as the preview pane would not show up for me, initially.
Creating a Tag
Now that we can see the various pieces involved in GTM, we are ready to make our first tag. The first one we get accustomed to in this part of the tutorial is the page view GA tag.
Up until now, GA has been firing the script for page view hits and sending it to itself for storage (assuming it has been set up). But after this configuration, GTM will be collecting that page view data and firing it off to GA for storage.
(It’s important to migrate from GA to GTM properly, which involves removing GAs script from your webpage)
First, in the tag panel under tag configuration, we selected the Google Analytics — Universal Analytics tag, and set the track type as “page view”
Then, we learned to create the variable, where we entered our Google Analytics tracking ID.

With our new variable set, we can now select it in the Google Analytics settings.

Lastly, we select the All Pages page view trigger. After configuring the variables and trigger, our GA tag is ready to fire a hit when there’s a page view.

Scripts and Pixels
In this section, we learn how to set up a custom Facebook tag in GTM, which essentially reports to the Facebook pixel platform. Just as GA stores and reports on data sent from GTM, Facebook’s platform also does the same, providing detailed reporting on user engagement.
Tracking Engagement
This was by far the most engaging part of the course, as we got to experiment with GTM and see all the moving parts in action. This is where I really understood the value and significance of GTM.
Following Mercer’s steps, I was able to set up click, time and scroll tags on my own website. I got to see them actually fire in the debug/preview panel, plus got the opportunity to troubleshoot a few issues along the way.

The coolest thing was seeing that data show up in the real-time and behavior reports of GA!

I played around with the naming conventions a little, trying to figure out what makes sense for me, and how the naming fields show up in GA.
Unfortunately I couldn’t play around with a YouTube tag because I don’t have a video to work with. But that will be my next step as soon as I’m ready.
The Data Layer

The DLP Tag (Data Layer Push)
I do admit, I need a little more practice with the data layer tags, as I wasn’t entirely clear on what I was doing every step of the way. The script we worked on was a bit confusing and I couldn’t fully wrap my mind around what exactly we were doing, some parts of the way.
I intend on reading more Google Tag Manager guides and perhaps watching a few more tutorials that deep dive into the elements that confused me.
In Conclusion
Overall, I found it pretty easy to understand tags, triggers and variables, and get an idea of what GTM is all about. This is all thanks to Mercer’s impressive teaching style. It’s simply unparalleled when it comes to data analytics. To my knowledge, no one in the industry teaches the tech stuff quite as well as he can.
In addition to Google Analytics, I’ve now got the basics of Google Tag Manager on my belt, and I’m excited to give it a “real-world whirl”.
What I really love is that with every subsequent analytics course I take, because CXL’s teaching quality is exceptional, I’m totally confident in my abilities to take on a full, advanced data analytics course.
That’s right! I’m no longer scared of the charts, graphs and numbers. I’m no longer terrified by the metrics.
So, thank you, CXL. For showing me new ways to think, for making my fear of numbers history, and most importantly, for teaching me how to make data-driven decisions in all aspects of the creative work I do.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Personal Branding: How to Polish Your Image with Cynthia Johnson

7 Powerful Ways to Use Psychology in Digital Marketing

Time to put on the poker face and play your best cards

Online Business Growth Doesn’t Have to Be Hard

Evadav integration with PeerClick

What if the world doesn’t see you the way you think? First Step to Personal Branding

3-Step Guide to Selling After Your Next Speaking Gig

A Guide to Calculating Marketing Agency Fees

All-Hands Responses

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
Nirant Borkar

Nirant Borkar

More from Medium

World Obesity Day Combatted with Tea!

Internship 101

Time and Piece-rate System for Remote Workers, Which Way to Go?

9 Ways To Get Out Of Your Comfort Zone