It’s a given that if you’re doing any type of marketing, especially online marketing, that you measure it. You probably already have Google Analytics installed, and maybe you even look at the data here and there. That’s great. Google recently moved to the Universal code. Have you changed yours or do you still have the legacy code installed?
Now let’s say you run a Facebook ad campaign to a landing page. Facebook ads need to have a conversion tracking pixel installed – a piece of code that displays a hidden pixel on the “Thank you” page. This shows that if that pixel gets displayed, that the person completed the task you were advertising for, like successfully registering for an event or purchasing something.
Now let’s say that you’re using CrazyEgg to measure people’s interactions and clicks on your website. Now you have to install a different set of code onto each page.
Every time you need to make changes to your code or add yet another snippet of code to your website, it gets very messy. You have to muck around in the PHP or other files to get it inserted in the right place.
- Does it go in the <head> section or in the footer just before the closing </body> tag?
- Did you successfully get it in all pages or do you have to install it on a single page?
It gets complicated, and you risk screwing up your code and breaking your site. Put it in the wrong place, and the next time you upgrade your CMS like WordPress, it may overwrite your changes. Or you have to pay a developer to install it every time you need to make a change. Ugh.
Google Tag Manager
Enter Google Tag Manager. It’s been around for a handful of years, but not many people are using it yet. Simply put, Google Tag Manager is another free tool from Google. You put one piece of code on your website once, and you can forever manage all “tags” (like Google Analytics, Facebook tracking pixels, CrazyEgg tracking code, etc.) through the interface. No more asking IT to program something into a specific page, or messing with code.
If you need to make a change, remove a tag, or add a new one, you just go into GTM and make the change in the system there.
Here’s a basic video on Google Tag Manager that shows the concepts pretty well. It’s a little dated, but you’ll get the idea about how it works.
Reasons Why You Need Google Tag Manager
It simplifies managing all the snippets of code that you need to put into the website without having to know PHP or .Net or HTML. Many tags are already built into the system (like Google Analytics and CrazyEgg). You just put your account number in, add the tag and click “Publish”.
You can easily set rules to fire the snippet on a specific page (like a Facebook tracking pixel), or on all pages (like Google Analytics).
You can give permissions to people (your marketing team, your outsourced marketing consultant, etc.) to manage the tags without having to mess with your website or code. If they go away for whatever reason, you just remove them from the permissions.
Set up “triggers” to fire on specific events that allow you track all kinds of cool things like:
- When someone clicks a link or button to go to an external site, like your event registration page
- When someone opens a PDF
- When someone scrolls the page to see more information
Keep track of all versions of your tags in the interface and easily roll back to a previous version of the tag. If someone made a change that broke the tag or it isn’t functioning properly, you can easily roll back and publish any version.
Here’s another somewhat more technical video from Google that shows how it all works.
How to Install Google Tag Manager
First you have to set up a free account by going to https://www.google.com/tagmanager. Create a container, which is your website. Once you create the container, you’ll get the code to install on your website. It looks something like this:
<!– Google Tag Manager –>
height=”0″ width=”0″ style=”display:none;visibility:hidden”></iframe></noscript>
new Date().getTime(),event:’gtm.js’});var f=d.getElementsByTagName(s),
<!– End Google Tag Manager –>
The tricky part is that the code has to go just inside the <body> tag at the top. If you put it in the <head> section or somewhere else, it will complain. However, once you have it set up correctly, you can manage all your tags from the interface. If you use DotNetNuke as your CMS, I wrote an article on How to Install and Configure Google Tag Manager in DNN.
Also, don’t forget to remove all the other tags you have for Google Analytics, etc. because you don’t want them firing twice. Be sure to document what they are so you can move them to GTM!
Google has a cool Google Tag Assistant app that you can install on your Chrome browser to make sure everything is working. Here you can see it activated on my home page:
When you click it, you get the green smiley faces showing everything is working the way it should be:
By the way, I discovered after wasting a bunch of time, that if you have an ad blocking app installed on Chrome, like AdBlock Plus, it blocks Google Tag Assistant making it look like things aren’t working right. Urgh.
This is just an introduction to Google Tag Manager. I’ll have more articles to show you some cool things you can do with it, and how to set it up.
Have you switched to GTM yet? Tell me in the comments below.