Google Tag Manager (GTM) is a powerful tool digital marketers can use to capture a load of valuable data to make better decisions. Getting this free tool installed is a relatively painless process if you don’t have a web developer or someone familiar with HTML and Javascript code. This is a quick breakdown of how you can install the tool and then verify it’s there.
The code part
All you need is access to your website’s source code and Google Tag Manager. You’ll be only adding two small pieces of code in the <head> and <body> tags in your website. The great news is both of these are easy to spot.
About the head
The head is like the brain of any web page. You can spot all the important code between the <head> and </head> tags. So when you see the instructions below, you’re looking for these tags which are near the beginning of all that messy code.
About the body
The body is everything you see on a web page. You can spot this by looking for the <body> and </body> tags. The instructions below make it pretty clear where to paste the code.
Now the GTM code
Below are only example pieces of code. I stripped out the GTM Container ID and replaced with GTM-XXXXXX. When log into GTM, go to Admin and Install Google Tag Manager. Copy and paste that code (not the below code).
Paste this code as high in the <head> of the page as possible:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXX');</script>
<!-- End Google Tag Manager -->
Additionally, paste this code immediately after the opening <body> tag:
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
The verification part
I like Chrome, and I like extensions. There’s an awesome Chrome extension that I use regularly: Tag Assistant (by Google). You can set up Tag Assistant to check your site to make sure your Google Analytics or Google Tag Manager codes are firing. If you have AdWords or other Google codes, it can check those too. Try it! If you see your GTM code showing up you’ve done everything right!
What’s this mean for the digital marketer
Not a lot…yet. You’re now ready to start adding variables, triggers, and tags to start gathering loads of data. And that’s the kind of stuff that gets me excited!
What’s next?
Google Tag Manager is in “draft” until you put out your first variables, triggers, and tags. So you don’t have to worry about anything yet. Next we’ll start talking more in depth about things GTM has to offer.