Google Tag Manager – The Ultimate Guide

Aimee Prince

Meet The Author

Name: Aimee-Leigh Prince
Position: Marketing Manager
From: Portsmouth, UK
Expertise: Social & AdWords

What You’ll Find In This Post…

  • The ultimate guide to using Google Tag Manager
  • How to create a container
  • How to create variables, tags and triggers
  • How to set up a goal in Google Analytics and import into AdWords

Let me just start off by saying I completely get it. You’ve been avoiding using Google Tag Manager because it’s so damn confusing, right? Well for a long time I was doing the same thing, just constantly putting it to the bottom of my ‘to do’ list and making up excuses as to why I didn’t need it. Boy, was I wrong. Google Tag Manager has been my secret little weapon ever since I’ve been using it and I am here to tell you exactly why and how you should be incorporating it into your website.

What is Google Tag Manager?

Google’s definition of Google Tag Manager is that it’s a tag management system that allows you to quickly and easily update tags and code snippets on your website or mobile app. Once the snippet has been added to your site you can configure tags via a web-based user interface without having to add additional code – meaning you don’ t need to be a pro web developer to make changes to your website!

Google Tag Manager is mainly used by marketeers wanting to closely track each and every part of their website for maximum optimization! You can track any click or movement via GTM and there are currently over 4 million websites taking advantage of Google Tag Manager right now so it’s time you jumped onto the bandwagon and set up your account.

I will  be talking you through how to set up a container, variable, tag and trigger on Google Tag Manager to track a click action on your website because well, click actions are my absolute favourite and most reliable way of tracking the conversions I need. Are you ready?

Step #1: Create a Container

Container – a small piece of code that you paste into your pages which enables GTM.

You can set up a Google Tag Manager account by simply logging into your gmail account, clicking here and then clicking the sign up for free button. You will then automatically be taken to the set up page where you create your first container. All you need to do is enter your company’s name, country, website and where you would like to use the container and bobs your uncle you’re all set. Pretty easy stuff.

Watch the video tutorial:

Questions? No worries I got your back:

google-tag-manager

When watching the video tutorial and setting up your own container you may have noticed a tick box similar to the one above. So what does this mean I hear you ask? Well simply put Google will remove all identifiable information about your website and combine your data with hundreds of other sites and report different trends to you.

Now for the techy part, you should have a bit of code on your screen that looks similar to the one below:

google-tag-manager

Got it? Fab. Now follow the instructions and add the code into your web pages <head> and <body>. If you use WordPress follow the tutorial video below:

Top Tip – Get the WordPress Insert Headers and Footers plugin to easily insert code without editing your theme files.

OK so, I hope you’re still with me because now we need to take one final step and publish the container! If you go back to your GTM work space you should see something similar to mine:

google-tag-manager

You need to give press the blue submit button and give the container version a name and description. To keep things simple I have just named both ShineRank. Click the blue publish button in the top right hand corner.

Congratulations! You have published your first container, go back to your work space and the green box should now look like this:

google-tag-manager

Before we move onto the next stage you might want to double check that your GTM code is active by installing the free chrome extension Google Tag Assistant. It’s a great way of seeing if all your Google tags are working correctly such as Analytics, Remarketing and of course GTM.

Step #2: Create a Variable

Variable – Name-value pairs for which the value is populated during runtime and are used in tags and triggers.

Let me guess, that definition has confused you as much as it first confused me? I’ll try and simplify things. Basically a variable tells GTM where to fire a tag and is used to store data that is used in defining a trigger (for us it will be our Google Analytics ID). There are two types of variables:

  • Built-In Variables – These are predefined and cannot be customised, but can however be configured (this is what we will be doing)
  • User Defined Variables – Variables designed and defined by us

Today I am creating a variable for Google Analytics so that I can track whenever someone clicks the email [email protected], which is positioned in the header of our website. Watch the easy to follow tutorial below:

Step-by-step:
  1. Click onto the variables tab on the menu
  2. Click onto the ‘user defined variables’ box to create a new variable
  3. Choose variable type (In our case it will be Google Analytic Settings)
  4. Add your Google Analytics tracking ID
  5. Rename (I chose ‘click email’ to keep it simple)
  6. Save
  7. Click on the top box which reads ‘configure’ and change to suit your needs (Again in our case we will need to add all the click elements as this is what we are tracking)

How easy does that look? It just takes a few steps to create a variable and once you get the swing of things this will become second nature. There are just a few pointers to remember when setting up a variable:

  • There are many different variables to choose from and this can sometimes be confusing. Visit Google’s website to find out what each variable type is used for.
  • It is important that you configure the built-in-variables to match your needs. I configured all the click elements as I am tracking a click. For a full definition of the configurations visit Google.

So if you’re pretty new to all this I’m going to go ahead and say you’re sat their wondering where on earth your supposed to find your Google Analytics ID?  No worries, I got this covered for you:

Step-by-Step:
  1. Go to your Google Analytics homepage
  2. Click on the ‘Admin’ tab at the bottom of the menu (to your left)
  3. Go to property setting and boom, there it is!

Woohoo! We have just created our first variable. It’s time to go grab a coffee and take a quick toilet break because we are now halfway finished.

Step #3: Create a Tag

Tag – A piece of code that sends information to a third party, such as Google Analytics

Are you back with me? Brought any snacks? Great! OK, lets get back to it. The next thing we are going to do together is create a tag.

Using tags within the Google Tag Manager interface is great because it means you don’t need to use a tonne of JavaScript snippets in your source code from a bunch of different marketing providers i.e analytics. Instead you choose what tags to use and when to use them all through the GTM interface. Watch the tutorial below to learn how to create a click action tag:

Step-by-Step:
  1. Click onto the ‘tag’ tab on the menu
  2. Choose ‘add a new tag’
  3. Click onto ‘tag configuration’ and choose the suitable option (In our case it will be Universal Analytics)
  4. Make sure you change the tracking type to ‘event’
  5. Name the category, action and label the same as you will need this when setting up a goal in analytics (I named all mine ‘click email’ to keep things simple)
  6. Choose the variable you created earlier from the drop down menu
  7. Click on the trigger box and make sure you click on ‘all pages’ as you will want to track the click action on all pages of your website
  8. Save
  9. Rename (Again to keep things simple I named it ‘click email’

That’s all for creating a tag and we are so almost there guys! Guess what it’s time to do? Yup, we need to create our trigger!

Step #4: Create a Trigger

Trigger – A condition that evaluates to either true or false at run time.  You define triggers with tags to specify when they should fire.

So to simplify things, a trigger is created to watch your web page for a certain event. In regards to what we’re doing today, the trigger I will create will watch out for a button click on anything that contains ‘[email protected]’. The trigger will then tell my tag to fire.

Creating triggers is just as easy as creating variables and tags so come on, lets get to it:

Step-by-Step:
  1. Click onto the ‘trigger’ tab on the menu
  2. Select ‘add a new trigger’
  3. Make sure you click onto ‘trigger configuration’
  4. We want to scroll down to the ‘click’ heading and select ‘all elements’ – remember those click actions we chose when creating a variable?
  5. Make sure the trigger is set to fire on ‘some clicks’
  6. Choose the click action you would like your trigger to fire on (I chose ‘click text’ with ‘contains’ as I find it tracks the conversions best and I have no other email on my website that contains ‘[email protected]’.

Wow, I’m really spoiling you guys with these tutorials, huh? Make sure you re-submit and publish your work to save everything!

And that’s it, you are officially a Google Tag Manager genius. But the fun doesn’t end here, next we need to create a goal on Google Analytics and import the this into AdWords so we can actually track the tag.

Step #5: Create a Goal & Import into AdWords

Creating a goal in Google Analytics is actually super easy and takes about 30 seconds to do. There are different goal types, but today we will be using an event goal, described on Google as an action defined as an Event is triggered.

Watch the video tutorial:

Step-by-Step:

  1. Click on the ‘Admin’ button on the left side menu. (Remember where we went to get our tracking ID earlier on?)
  2. In the third column along you will see an option labelled ‘Goals’ – click onto this
  3. Add new goal (the red button)
  4. Select a template with a pre-filled configuration (none are applicable to us so choose the custom option at the bottom
  5. Name your goal (I kept it simple by calling it ‘click email’
  6. Our goal type is an Event as we are tracking a click
  7. Insert the category, action and label. You can leave the value blank as we are not tracking any type of value
  8. Click save!

See, super easy, right? There are just a few things to remember:

  • Remember when we were creating a Tag and I told you to name the category, action and label the same? Well make sure you insert the exact same name into the category, action and label fields in analytics. (See in the video where I put ‘click email’.)
  • Visit Google’s website to learn everything you need to know about different goal types.
  • It can sometimes take up to 24hrs for your goal to start working, but make sure you do a test to ensure everything is working smoothly

Phew, I’m getting pretty tired. Good job we are on our last and final step! So we have our goal set up in Analytics and it only makes sense to import this into AdWords. This takes even less time than creating a goal, just make sure you are logged into your AdWords account and follow the tutorial below:

Step-by-Step:

  1. Go to the ‘tools’ tab on the top menu bar and click onto ‘conversions’
  2. When the page has loaded go to the ‘Google Analytics’ tab on the left side menu
  3.  Select the goal (click email) and import at the bottom of the page
  4. For this particular goal we need to go to the value section and click ‘don’t assign a value’
  5. Import goal

Congratulations! You have just created your first GTM tracking goal. Remember this article is aimed at people who want to create specifically a click action, but there is so much more you can do!

I know it’s a lot to take in but trust me, if you’re a control freak like me then you will honestly LOVE the accuracy you have of tracking conversions with GTM.

If you have any questions whatsoever then feel free to contact me on the email below.

Aimee Prince

The Author

Name: Aimee-Leigh Prince
Position: Marketing Manager
Email: [email protected]
Expertise: Social & AdWords