Introduction to Google Tag Manager

Posted: February 18, 2015

Let’s face it. Most marketing departments – sometimes even a single marketer – can cause a world of headaches for webmasters and/or IT. As marketers it’s not always our fault, and we definitely feel bad about it. But the fact is that there are a ton of products and add-ons we need to do our jobs. One thing those products have in common is the bits and pieces of code that have to be deployed across our websites.

In this blog entry I’ll describe website tags at a high level (what they are, how they’re used, why you’d want help from Google to manage them). Then, I’ll share some of the key benefits of using Google’s free tag management solution, Google Tag Manager, as well as some tips for implementing GTM on your own site.

You might ask, how is another product, another add on, another tag for that matter, going to help me? Take a simple two channel advertising campaign for example. You might run ads on the Google Search Network and on Facebook to drive qualified traffic to your landing page.

Then maybe you’d use a another platform to serve retargeting ads back on Facebook and display networks. You want in-platform tracking against your ad spend, as well as site-wide campaign tracking so you see your paid campaign’s impact versus organic and referral traffic.

Here’s the list of third party codes you need just to facilitate this simple campaign:

  • Google Analytics snippet – because every site should use Google Analytics (why not?)
  • Google AdWords conversion tracking – fired only on the page after your form submission or check out.
  • Facebook conversion tracking – fired on the page after your form submission or check out.
  • Retargeting tag – fires on all the pages of your site (examples could include AdRoll, PerfectAudience, Retargeter)

As you scale this campaign across more channels, goals, programs, etc. this list can grow pretty fast. This is where tag management comes into play.

First, to make sure we’re all on the same page, here’s a quick look at some of the terms used in this blog:

  • Tag – We’ll use this term to refer to any code that sends information to third party.
  • Javascript – This is the language used to write most of the tags you’d use on your site.
  • Cookie – A small text file that is kept on your users’ web browser, a cookie is used to store information about users interactions with your site.

Why Google Tag Manager?

Like you saw with our example of a simple online advertising campaign, the number of tags you need on the different pages of your site can scale up quickly as you add complexity. Some tags only belong on thank you or confirmation pages, others belong on all of the public pages of your site. You can certainly work with a developer to build the logic for deploying code through your CMS, and this is how many website publishers operate. If those changes tend to involve a lot people, communication or days of waiting to get tag changes made, your site (and organization) might be a good fit for a tag management solution like Google Tag Manager.

From your developer’s perspective, Google Tag Manager (GTM) requires a single code that goes across all of the pages of your site. This code is called the container snippet. The container is the only change you’ll need to make to the HTML on your individual site pages.

From there, you as the marketer will gain ultimate control over which tags are applied to the pages on your site. You can easily add, manage and remove them from a single interface.

GTM can handle any kind of javascript tag, but it comes with preset templates for all Google tags (like Google Analytics, Universal Analytics, AdWords conversion tracking, Floodlight) as well as commonly used third parties like AdRoll, ClickTale, comScore, Neustar, Marin Software and others.

Tips for Implementation

First, you’ll need to set up your GTM account at google.com/tagmanager. It’s recommended that you create a single account for your entire organization.

Inside of your new GTM account, you’ll be able to create containers. The best practice here is to use one container per domain. If your institution has different sub domains set up for different divisions that operate independently of one another, you can create different containers for each.

For example:

  • Container 1 – your-university.edu
  • Container 2 – business-school.your-university.edu
  • Container 3 – undergraduate.your-university.edu

User permissions can be set accordingly for each of these containers, putting power in the hands of those who need it. If you implement GTM on your institution’s site, don’t forget to account for these considerations in your website governance plan.

From here you’ll want to place the container script on each page of your site. You can use your CMS to dynamically insert it on each page so you don’t have to manually edit the HTML of hundreds or thousands of site pages.

Once your containers are set up, populate them with the all of the tags you need on your domain(s). You can use rules and macros to determine where and when each tag will fire. For example, you’ll want your Google Analytics or Universal Analytics tag on each page of your site.

When you deploy a conversion tag, those should only appear on the Thank You pages that directly follow a form completion. You can write the logic for that within GTM:

GTM also comes with a debugger tool so that you can be confident that your tags will fire properly upon publishing the live version of the container.

One Last Tip

When your tags are set up in your container drafts, it’s time to remove all of the hard coded site tags and publish your newly configured containers across the pages of your site. This step is very important because if you don’t remove all of the hard coded tags from your site pages, you will end up sending redundant data to your third party products.

If you have questions about analytics, tag management or online advertising, feel free to drop us a note. We’d be happy to chat!