Setup Google Tag Manager on WordPress

Setup Google Tag Manager on Wordpress

Thanks for taking time out of your day to follow this Step by Step Guide on How to setup Google Tag Manager on WordPress. I would recommend at this point making a cup of coffee or rooibos chai tea, be for starting.

So why use Google Tag Manager?

Every business or project needs to have accurate tracking to monitor their growth rate. Let’s say you have an online shop, you would need to see what your clients are doing throughout the buying process. There might be people feeling that your payment page is not safe then dropping off, you will be able to pick this up if you have correct tracking.

Or you have a blog. It’s always good to track who stayed to read your article and did they click the call to action after reading to support your blog in some way? Knowing this info can help you improve the content and grow your following.

How exactly dose Google Tag Manager do?

The great thing about Google Tag Manager, is you don’t need to be a website developer to use this tool, you just need to paste tracking code in the head tag of every page on your website. Keeping it fast and streamlined. All you need to do is to learn Google Tag Manager.

All the tracking you setup, will be sent to your Google Analytics which will fire Event Goals, which is your Conversion Tracking. This will give you more insight into your business and allow you to have the relevant data.

Setting up Google Tag Manager

Right. Now that you know why, let’s jump straight into the step by step guide on how to setup Google Tag Manager.

  1. Go to Google Tag Manager Website
  2. Sign in or Sign up for Free
  3. Setup a New Account
    • After logging in, you will be asked to setup your account.

      Fill in your Company Name under Account Name.
      I would recommend ticking the next tick box.
      Then Click on the Continue button.
  4. Google Tag Manager Created new account
    • Next, we are going to inform Google Tag Manager or GTM that we are going to be tracking on a website. A container is going to hold all the things you are tracking.
    • In Container name make sure you fill in your website name as it displays in your browser, you can just leave the protocol off “HTTP:// or HTTPS://”. For example “”.
    • Click on the Web button under Where to Use Container.
    • Click the Create Button.
  5. Create new container in Google Tag Manager
  6. Accept Google Tag Managers Terms and Conditions
    After that, you will be shown the Google Tag Manager Terms and Conditions. Please take the time to read this and when done, click Yes to accept.
    Google Tag Manager Accept Terms
  7. Copy GMT Tracking Code
    This completes this section. Next we are going to copy the code in the first box and add it to your WordPress website.Google Tag Manager get GTM code

Installing Google Tag Manager Tracking Code

There are many ways we can add the Google Tag Manager tracking code. Some are safer and easier than others.

Your Tracking code needs to be in the code of your website that loads before the page that you and I see. What’s more, it needs to be on every page. With WordPress, it is easier than others but at least you know where we are going to put this code.

Now some of you have a Premium WordPress Theme and you can simply add this code into your theme options. This varies from theme to theme.

If all else fails, here is a harder method.

Go to your WordPress Website and Login to the Dashboard

  1. WordPress login page
    WordPress login page
  2. Click on Appearance on the Main Dashboard Navigation
    You will find this menu on the left of your screen.
    WordPress Appearance Menu
  3. Click on Editor
    On the bottom of the Appearance menu, you will find Editor.
    WordPress Appearance Menu Editor
  4. Find header.php on the right
    Once that has opened, look for header.php on the right, then click on it.
    WordPress Theme Editor - Header.php
    Please note, if you do not see the header.PHP, then you might be using a child-theme. In this case, you just need to ask your hosting provider to copy your header.php into your child theme, so you can see it. Your hosting provider should know what to do.
  5. Find the TITLE tag in the header.php Code
    Once you have opened your header.php, it will display all the code in the middle. Look for the TITLE Tag and past the GMT Code just above it.WordPress header code with tracking
  6. Click Update
    Then click update on the bottom of the page.
    WordPress Update header file

Add Variables needed in GTM

At this point, you have a blank canvas and now we need to get your colors ready. In this case, it’s your variables. Variables are basic functions that you are going to use often. We need to turn them on.

  1. Go back to your Google Tag Manager
    Go back to your track manager that you have just setup. Make sure you are on your WorkSpace, Overview page. It will look something like the image below:
  2. Google Tag Manager Variables Menu
  3. Click on the Configure Button
  4. Add the preset Varibles you need
    I recommend ticking all the forms and clicks variables.

Add Page View Tag and Trigger

Finally, we are going to add your first Tag and Trigger. We are going add your Google Analytics Page View Trigger into Google Tag Manager. This will mean you will have less code with in your website and Google Analytics will still know when someone views your pages.

Let’s start with your Tag. Then we will make a trigger to trigger it and send your Google Analytics the data.

    1. Click on Tags on the left
    2. Click on NEW
    3. Name your Tag
      Make sure the naming of your Tags are clear and short. We are going to name this Tag “GA Pageview”.
    4. Click on the Tag section
    5. Choose Universal Analytics

Google Tag Manager Universal Analytics

  1. Fill in your Google Analytics Tracking IDYou need to insert your Google Analytics Tracking ID. We are going to leave “Track Type” on Page View, because this is what we need.

To get your Tracking ID, just follow the steps below:

  1. Log in to your Google Analytics
  2. Select ADMIN on the Menu
  3. Select Tracking Info under the Properties Colum
  4. Then click on Tracking Code.
  5. You will find your Tracking ID there.

Then in Google Tag Manager:

  1. Click on the Trigger section
  2. Select Page View Trigger
  3. Then Save
  4. Remember to Publish

This step is often forgotten about, I have found many people going though there setting thinking that they have done a bad setup and all that was needed was the just a publish.

Other Examples of Tags and Triggers

Now that you know how to get the basics of Google Tag Manager running, I need to leave you with some great Tags and Triggers that will really help. I have listed some below.

Track Click to Call

When you setup your Tag and Trigger, just copy the image below:

Click to Call Tag

And here is the Trigger you need with that Tag:

Google Tag Manager Click to Call Trigger

Track Click to Email

When you setup your Tag and Trigger, just copy the image below:

Click to Email Tag

And here is the Trigger you need with that Tag:

Well done! If you have completed all the steps as described above, then you have successfully setup Google Tag Manager. I would recommend bugging me to write up a howto on making goals in Google Analytics to take you to the next steps…

If all the above has confused you or you just don’t have the time, I totally understand. I will assist you to get this setup for you.

Normally, Your SEO Company should set this Google Tool up for you if you need it.
Feel free to contact me and I will see what I can do.

Some Common Google Tag Questions

Below are some videos on common questions often people ask about when they are looking into Google Tag Manager or just started using it. Just a great way to understand this great google tool


SEO Company

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.