How To Create And Install Google Tag Manager On WordPress 2020

Learn how to create and install Google Tag Manager on your WordPress website with our simple tutorial.

Watch here

Hi everyone it’s Sean from Vixen Digital, PPC agency in Brighton. Today I’m going
to be showing you how to install Google tag manager on your WordPress website so
without further delay let’s get started
hi everyone so let’s jump right in so we’re going to get this Google tag
manager account set up on our installed on our WordPress website so first of all
we need to make sure we’ll actually logged in with our Google account and
then we’re going to go to the tag manager home page and we’re actually
going to have to create an account so we’re going to do that really quickly so
my website is called my fake shop so I’m just going to call the account name the
same that’s my fake shot country is going to be United Kingdom container
name so this is your contain the name of the out your actual Google tag manager
container I’m going to call this the the website name so I’m just gonna copy that
over and take out this and it’s for web use creates agree to the terms and
conditions yes and then we get taken to the tag manager home page if it’s your
first visit you’ll usually get this pop-up of the code I’m just gonna get
rid of that a second just so you can see this interface so if you want to see
that code again we just click on the actual Google tag manager container code
here the container ID number here so if we click on it we’ll have these two
pieces of code one piece occurred that needs to go into the head of your page
and one piece of code that needs to go into the body so I’m gonna copy over the
head excuse me I’m gonna so I’m going to copy over the head code make sure that’s
copied I’m going to go over to my website and we’re going to go to the
your WordPress dashboard and we’re going to go down to
theme editor now I’m using a child theme so I recommend that you also do the same
and not to make any changes to your to a main theme I’m going to go to my child
theme and I’m going to navigate to the theme header that’s a load and in the
theme header I’m gonna insert this piece of code just under where we can see the
head tag okay and then I’m going to find what the body
tag is so we can see that the start of the body tag is here so I’m going to go
back over to tag manager copy the body tag and I’m going to paste that there
and then going to update file
okay and then I’m going to open my site in a new tab so one way we can check
this is that if we go and use the Google tag assistant Chrome browser extension
we’re just going to enable that refresh
and we can see that this is picking up the Google tag manager that we’ve just
installed another way to do it is if we go through back to our Google tag
manager interface we can go to preview
and this will put it into the preview mode so then if we go back to our tab
with our our website we can refresh this and we should see there we go so the
Google tag manager debugging tool this has popped up on our page so that
confirms that it’s in place now what we can do is go through each individual
page and just check that that’s actually appearing on on all pages so we can see
just to test it
but yeah I mean you should be okay as if you’ve implemented it correctly it
should all be fine so what you can see on the on the shop
is that we have got Google tag manager here but one thing that we just want to
make sure to do just right at the end this we can leave preview mode and I’m
just going to make sure that this Google tag manager is actually initialized so
I’m just gonna publish that and then we have it all done so hope that helps and
thanks for watching

Google Tag Manager is a free tool provided by Google for the management of your marketing tags on your website or mobile app.

Google Tag Manager is used to implement code snippets or tracking pixels which allow you to track user behaviour on your website, without having to implement code. Google Tag Manager can be used to install things such as Google Analytics and Google Ads tracking as well as your Facebook pixel.

One of the best reasons for using GTM is that it makes it easier and simpler for you to implement tracking on your website without having to work with a web developer. It can save you time and the added cost of hiring a developer.

1. Create Your Google Tag Manager Account

The first thing to do is to create your Google Tag Manager account if you haven’t already created one. Navigate to the Google Tag Manager website, log in if required, and select create account in the top right corner of the user interface.

Google Tag Manager will first ask you to name your account and select your country. It is usually best to name your account the same as your business, brand or organisation.

Google tag manager account

Create your Google Tag Manager container

You will then need to complete the container setup. It is good practice to give your container the same name as the website that you plan to install your GTM container on.

Create google tag manager container

Once you’ve filled in the necessary information, you can click the ‘create’ button, read and accept the terms & conditions and congratulations! Welcome to your new Google Tag Manager account. You will be taken straight to the Google Tag Manager container you have just set up.

If it’s your first time viewing your account you will see a popup installation instructions box with your GTM installation code. If you have dismissed this popup or can’t see it, you can simply click on the GTM container ID in the top navigation bar.

2. Insert Google Tag Manager Code In WordPress

If it’s your first time viewing your account you will see a popup installation instructions box with your GTM installation code. If you have dismissed this popup or can’t see it, you can simply click on the GTM container ID in the top navigation bar.

This will bring up your installation instructions and code snippets.

Copy the code in the <head> section and then navigate over to your WordPress website.

Go to your WordPress dashboard and on the left-hand side navigate down to Appearance > Theme Editor

This will open up your theme files. It is strongly recommended that you install and only make changes to a child theme.

You will see your theme files on the right-hand side. Find your Theme Header (header.php) and select it.

In the file content where you can see all of the code, find the <head> tag and just below it, on the next line, paste your Google Tag Manager code.

Return to your Google Tag Manager container and this time copy the code from the <body> section

Go back to your WordPress dashboard and navigate back to your theme editor and your Theme Header (header.php) file. 

This time find the <body> tag and paste your code on the line directly beneath that.

Then click the blue “Update File” button.

3. Test Your GTM Installation

You can test that your installation has been implemented correctly by using Google’s Tag Assistant Chrome extension.

Alternatively,  you can navigate back to GTM and enter the “Preview” mode.

Once you have entered preview mode, view your site in another tab on your browser. If GTM has been installed correctly, you will see the GTM debug window appear towards the bottom of your screen. 

4. Publish

You can then return to your GTM interface and leave preview mode. Click the “Submit” button and enter as much information as you can in the submission configuration boxes about the changes you have made. 

Then click “Publish”. 

Congratulations! You’re all done! You’ve successfully installed Google Tag Manager on your WordPress website.

Contents

Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp