• magnifying glass icon
    • left wave svg right wave svg
      6 Mins

      Tag Manager & Analytics - The Easy Set Up Guide

      Tag Manager & Analytics - The Easy Set Up Guide Featured Image
      Published on May 1, 2014 by Jon Payne

      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.

      Set Up Tag Manager Account

      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.

      Google Tag Manager - Container Set Up

      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!

      Google Tag Manager - Container code example

      4. Create a Tag for Universal Analytics

      You'll now be presented with your first Tag. Give it a name:

      Naming A Tag

      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".

      Set Up Universal Analytics Tag

      Google will warn you that you'll need to change your website T&C's / cookie policy now, but this isn't always necessary. If you're not retargeting or remarketing based 0n this data, you're probably OK. If you're worried, check with a solicitor. Neil Howlett knows his onions and cookies... if you're stuck for a trustworthy one.

      6. **EASY TO MISS** FIRING RULES

      Add 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 .*

      Choose that!

      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'

      Validate the universal analytics 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:

      Google Analytics Validation Fail

      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:

      Affinity Report, Google Universal Analytics

      That's it.

      If you have any questions, tweet me or circle me. I'll help.

      Lego Programmer Image Credit: WiredForLego

      Jon Payne

      Founder and Technical Director of Noisy Little Monkey, Jon blogs about SEO and digital marketing strategy.

      Related Articles

      Black woman on the phone
      Topic: HubSpot, Sales Tips (4 Minute Read)

      Why sales teams need to change when the economy gets tight

      Person in a blue t shirt holding LOTS OF MONEY
      Topic: HubSpot (4 Minute Read)

      How to unpack the value trapped in your HubSpot

      Subscribe to our blog

      Get monthly digital marketing tips sent straight to your inbox want to know what you expect before you subscribe? You can preview the monthly newsletter right here.