Menu
Cart
BAK Digital
Cart
  • Home
  • What we do
    • Social Media Marketing
    • Email Marketing
    • Pay Per Click Marketing
    • Search Engine Optimisation
    • Web Development
    • Landing Page Design
    • Pay Per Click Management
    • Digital Consultancy
  • Courses
  • Ebooks
  • My Account
    • My Courses
  • Customer Services
    • Contact Us
    • Cookie Policy
    • Privacy Notice
Close Menu
Close Cart
Set Up Google Tag Manager with icons

How To Set Up Google Tag Manager on WordPress

Knowledge Level Beginner Pay Per Click, Web Development

Google Tag Manager (GTM) is a free, online tool provided by Google to easily manage tags for marketing purposes on your site. GTM is most commonly used for installing and managing tags from Google AdWords and Google Analytics; more on that in future posts. For now, we are just going to be focusing on how you set up Google Tag Manager on your WordPress site.

The beauty of GTM is that you don’t have to rely on a ‘web guy’ to add pesky bits of code to your website. It provides you with a hassle-free way to manage code used for tracking user activity on your website. So, if you like the sound of keeping the code on your site as clean as possible, we highly recommend using Google Tag Manager.

Anyway, enough of why you should be using it. Here’s your guide on how to set up Google Tag Manager for WordPress.

Account Setup

The first thing you need to do is go to the Tag Manager site. With any luck, this is what you will see;

gtm add new account screenshot

This page is pretty self-explanatory. You will need to choose an account name, which would most likely be the name of your business. In addition to the name, you will also need to select the country in which you are based. And as you can see, you can choose whether or not you would be happy for your data to be shared anonymously; that’s your call.

The second step involves setting up a ‘Container’. Your container will be where all of your tags are stored. So, rather than having lots of separate bits of code hanging around on your site, they will all be contained within… well, a container! You will need to give your container a name. Obviously it is completely up to you what you call the container, but most stick with the URL of their website. Finally, you just need to choose where you will be using your container. This is how it looks;

GTM container location screenshot

Obviously, as you are looking to set up Google Tag Manager on WordPress, you will need to select ‘Web’. Then just accept the Terms of Service, and that’s the first step done.

Oh, and for those of you who thought the fourth option was something that you plugged a guitar into… you would be right. However, in the context of digital marketing, AMP refers to Accelerated Mobile Pages.

Set Up Google Tag Manager

Now that your account is set up, you will need to install GTM onto your WordPress site. This is the only time where you will need to pop a bit of code on your website. But, before you look at the image below and think, “Erm… I’ll pass!” bear with us! You don’t need to worry about this,I promise that you don’t have to be some kind of software engineer to work this out.

So, here’s what you should see now;

GTM installation code screenshot

Both of the above snippets of codes will need adding to the ‘header.php’ file on WordPress.

To do this, you are going to need to open up a new tab and login to your WordPress account. When the dashboard loads up, you should see ‘Appearance’ on the left-hand side of your screen; click on that and then ‘Editor’.

appearance option wordpress dashboard screenshot

Once you have opened the Editor, you should see the header.php on the right hand side. It will look something like this;

header php file wordpress screenshot

Where Do I Paste My Code?

For the first snippet of code, you’re advised to copy and paste it as close to the <head> tag as possible. This is what this area you will be pasting into should look something like;

php head tag screenshot

If yours looks identical to the screenshot above, then you would paste the code into line 5, just below the <head> tag.

As for the second snippet of code, it advises you to copy and paste it as close to the <body> tag on the page. With any luck, you should be able to find the opening body tag (<body>) just after the closing head tag (</head>), a bit like this;

php body tag screenshot

Once you have pasted the code just below the opening body tag, that’s you all set up on the code front. Now, all that’s left to do is publish your container on GTM. So, head back over to your GTM account and make sure you are on the ‘Workspace’ tab. If you are, then the top-right-hand corner of your screen should look like this;

gtm workspace container id screenshot

Obviously you will just have a different unique Container ID. All that is left for you to do is click ‘Submit’; name your first version and hit publish! Your version name just needs to be something simple and self-explanatory, like ‘Initial Setup’.

Job done! You are now ready to begin adding tags like: Google Analytics, Google AdWords Remarketing and Conversion Tracking to your Container.

The Updates to Google’s Exact Match Keywords How to Set Up ‘Lead’ Conversions on AdWords using Google Tag Manager | Tutorial

Related Posts

youtube bumper machine 6 second ad blog graphic

Pay Per Click, Social Media, Web Development

YouTube’s ‘Bumper Machine’ – New 6 Second Ad Tool

Web App vs Mobile App

Web Development

Mobile Apps and Web Apps – What’s the Difference?

Product Page Converts

Web Development

How to Create a Product Page That Converts

Index of all Knowledge Articles

All Knowledge Articles

Missed a Newsletter?

Newsletters Archive

Affiliates

Affilaite Login

Recent Knowledge Articles

  • Hidden Likes Count on Instagram – What Might Happen
  • YouTube’s ‘Bumper Machine’ – New 6 Second Ad Tool
  • LinkedIn’s New Reactions – 2019 Update
Back To Top
BAK Digital
© BAK Digital 2021
BAK Digital is a trading name of Brooks and Kirk Digital
Brooks and Kirk Digital LTD is registered in England and Wales. Registration Number 12362084
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish.AcceptReject Read More
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are as essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.