We've been converting clients over to Google Tag Manager recently. If you've not heard of tag management yet, we've written an in-depth article, What is Tag Management? – I'd encourage you to read through it.
What is a Tag?
A tag is a snippet of code that sends information to a third party, such as Google. If you don't use a tag management solution such as Tag Manager, you need to add these snippets of code directly to files on your website or mobile app. Google Tag Manager Overview
Aside from the benefits of tag management, Google Tag Manager has some native support for applications like Google Analytics as well that you'll want to take advantage of. Because our agency works quite a bit on content strategies for our clients, we're configuring GTM across our clients. With Google Tag Manager and Universal Analytics, we can configure additional insights with Google Analytics' Content Groupings without having to edit core code on our clients' sites. Configuring the two to work with one another is not for the faint of heart, though, so I want to document it for you.
I'll write a future article on configuring Content Grouping with Google Tag Manager, but for today's article, I have 3 goals:
- How to install Google Tag Manager on your Site (with some details for WordPress added).
- How to add a user from your Agency so they can manage Google Tag Manager.
- How to configure Google Universal Analytics within Google Tag Manager.
This article isn't just written for you, it's actually a step by step for our clients as well. It will allow us to manage GTM for them and continue to both optimize how external scripts are loaded as well as enhance their Google Analytics reporting.
How to Install Google Tag Manager
Utilizing your Google Analytics login, you'll see that Google Tag Manager is now an option in the primary menu, just click Sign In:
If you've never setup a Google Tag Manager account before, there's a nice wizard to walk you through setting up your first account and container. If you don't understand the verbiage I'm using, be sure to watch the video on this post that walks you through!
First, name your account. Typically, you'll name that after your company or division so that you can find and manage each of the sites and apps you may have Google Tag Manager installed on easily.
Now that your account is setup, you need to setup your first container.
When you click create, you'll be asked to agree to the Terms of Service. Once you agree, you'll be provided two scripts to insert into your site:
Pay attention to where you insert these script tags, it's absolutely critical to the behavior of any tags that you're going to manage within Google Tag Manager in the future!
Using WordPress? I'd highly recommend the Duracelltomi Google Tag Manager WordPress Plugin. When we configure Content Groupings in Google Analytics, this plugin enables features with built-in options that are going to save you a lot of grief!
If you're configuring GTM using a third-party plugin or integration, you're typically just asked for your Container ID. I've gone ahead and circled that in the screenshot above. Don't worry about writing it down or forgetting it, GTM makes finding it nice and easy in your GTM account.
Have your scripts or plugin loaded? Awesome! Google Tag Manager is installed on your site!
How to Provide Your Agency Access to Google Tag Manager
If the above instructions were a bit too difficult, you can actually jump directly to providing access to your agency. Just close out the wizard and click Admin on the secondary menu on the page:
You'll want to click User Management and add your agency:
[box type=”warning” align=”aligncenter” class=”” width=”80%”]You'll notice that I'm providing all access with this user. You may want to treat your agency access differently. Typically, you'll add your agency as a User and then give them the ability to Create but not Publish. You may want to retain control of Publishing tag changes.[/box]
Now your agency can access your site within their Google Tag Manager account. This is a much better approach then providing them with your user credentials!
How to configure Google Universal Analytics within Google Tag Manager
Even though GTM is properly installed on your site at this point, it's really not doing anything until you publish your first tag. We're going to make that first tag Universal Analytics. Click Add New Tag on the Workspace:
Click on the tag section and you'll be prompted with a selection of tags, you'll want to select Universal Analytics:
You'll need to get your UA-XXXXX-X code from your Google Analytics script that's already in your site and enter it in the correct section. Don't click save yet! We have to tell GTM when you want to fire that tag!
And, of course, we want the tag to fire every single time someone views a page on your site:
You can now review your tag's settings:
Click save and you will see a summary of the changes you made. Keep in mind that the tag still isn't published to your site – that's a great feature of GTM. You can make tons of changes and verify every setting before deciding to publish the changes live to your site:
Now that our tag is properly configured, we can publish it to our site! Click Publish and you'll be asked to document the change and what you did. This is extremely helpful if you have multiple administrators and agency partners working in your site.
[box type=”warning” align=”aligncenter” class=”” width=”80%”]Before you publish your tag changes to your site, make sure you remove any previous Google Analytics scripts within your site! If you don't, you're going to see some really wonky inflations and issues with your analytics reporting.[/box]
Boom! You've clicked publish and the version is saved with details of the tag edits. Universal Analytics is now operational on your site.
Congratulations, Google Tag Manager is live on your site with Universal Analytics configured and published as your first tag!