Sometimes, getting your web development team to make (what seem to be) little tweaks to your website can take an age. Often this is because the knock on effect of what you're asking for causes a lot of work, sometimes it's because the web devs are already snowed with other work and occasionally it's because they're too busy playing Zerg Rush.
Google Tag Manager allows you to add a virtual container to each page of your website. This container, which contains tracking code to help you learn how well each element of your marketing strategy is working for your website, can be edited from your Google Account without having to bother your IT or web dev team. It's perfect for Google Analytics, AdWords Tracking, AdWords Remarketing and heaps of other stuff.
This is a quick guide to getting Google Tag Manager set up so you can get started with Universal Analytics. I'm assuming you already have a Google Account and this has Admin rights to the Google Analytics account you use. I'm also assuming you need the set up for a website, not an app.
1. Set Up An Account
Go to Google Tag Manager and click "Sign Up Now" or "Sign In". You'll be asked to give an account name. I like to use a recognisable name. The website to which I'll be adding the tag is http://odlbristol.co.uk and since I manage lots of accounts it makes sense to call a spade a spade.
2. Set Up A Container
A child of the Account, a Container holds the Tags which you'll set up later. My naming convention is the website name without the TLD (the .co.uk / .com bit). In the image below, I've selected that the Container will sit on Web Pages and added the domain it's going to live on.
If your website lives at www.yoursite.co.uk then I'd suggest adding the domains http://www.yoursite.co.uk AND http://yoursite.co.uk just to be on the safe side. Don't forget to add the https:// version of your site too, if you have any secure pages.
Since the site I'm working on doesn't have a www. in the domain name and isn't running on a secure server I don't add any https:// or www. versions of the domain here.
3. Add the Container code to your website
Possibly the trickiest bit, you need to add the code that Google gives you to your website. If you're comfortable with code, then go ahead and simply add this just after the opening <body> tag and remove the existing Google Analytics code (if you have that set up). If you've not, copy it into notepad and email it as an attachment to your web developer asking them to to do that.
It might take a while for your web dev team to get it done, but you can continue with the following steps anyway. That way when the Goggle Tag Manager code is inserted and any old Google Analytics code is removed, you'll be ready to rock and roll!
4. Create a Tag for Universal Analytics
You'll now be presented with your first Tag. Give it a name:
5. Setting up the Universal Analytics Tag type
Choose "Universal Analytics" from the list of Tag Types and add your Google Analytics Tracking ID (if you need help to find that, check out this Google support doc).
Tick the box to "Enable Display Advertising Features".
6. **EASY TO MISS** FIRING RULES
I missed this the first few times and couldn't figure out why nothing worked. It's over there on the right of the screen as you set up your tag, "Firing Rules" click Add.
There’s only one, already to choose: All pages matches RegEx .*
7. Save Tag
Scroll past "More settings" and "Advanced Settings" and click the "Save" button.
8. **EASY TO MISS** PUBLISH CONTAINER
I don't think this is strictly necessary but to be on the safe side, I always go back and look at the Container (in the left hand menu, select versions, click on the most recent) and then click Publish at the top right of the screen.
9. Validate in Google Analytics
Assuming you or your web developer has already added the code from Step 3 above to your website, then all you need to do is validate the new Analytics code.
Log into the relevant Google Analytics account and in the Audience sub-menu, click 'Demographics', then 'Overview'. Then click 'Validate Tracking Code'
On the few sites I've set up, this never works instantly and it looks like nothing's happened, so don't worry if you see something like this after you've clicked that button:
DON'T PANIC! If you have the time, simply click the validate button a few times in frustration then leave it for 48 hours. Come back to a demographics report in Analytics and if it's all worked you'll see something like this: