In this lesson, I'm going to show you how you can gets started with Google Tag Manager.
We're gonna install it on your website, and I'm going to give you a little bit more tips
on you to place the Google Tag Manager snippet correctly in your HTML code.
All and more coming up right after this.
Hi, there, and welcome to another video of Measureschool.com, where we teach you the
data-driven way of digital marketing.
My name is Julian, and in our first lesson, we have talked about the core functionality
of Google Tag Manager.
I gave you a little bit of an overview.
Now in this lesson, we're gonna discover on how to install Google Tag Manager correctly.
There's actually a lot of things that you can do wrong, so please follow along closely.
But before we get started, if you want to test your knowledge after this lesson, then
head over to measureschool.com/lesson2 and you can go through a little bit of the quiz
and we'll send you some more resources afterwards.
We've got lots to cover, so let's dive in.
Today our journey starts by going to your browser and opening up the url, tagmanager.google.com.
And it will prompt you with a login screen.
Now what you need to input is a Google account address.
So if you have an account for example, gmail or YouTube, you'll be able to use that email
address to open up your tag manager account.
If you don't have an account, then you can easily create one by clicking this link.
I will skip over this because I have a account that is associated with my Google account.
And we simply login, and we'll get redirected to our Google Tag Manager account.
Now chances are if you haven't worked with Google Tag Manager, you don't see all these
different containers.
You'll be directed to creating a new account.
In this step, you'll be able to create a new account and then set up a container.
What does that mean?
Well, a container is the actual Google Tag Manager snippet, and you'll be able to post
multiple instances of Google Tag Manager within one account.
So the recommended way of setting this up is actually entering your company name here,
deciding whether you want to share this data with Google or not, and then entering as the
container, your actual website.
So later on, you could add multiple containers to that one account.
In the last step we choose our container type.
In our case, we want to track a website, but it's also possible to install Google Tag Manager
on IOS or Android apps, which is a whole nother process of installation, which we'll not cover
in this tutorial.
Let's click on Web here and create, and have to go through the terms of service and agree
to them.
Then we will greeted with our actual Google Tag Manager snippet.
And this is a marketing tag in essence which you need to install to your website.
Now I've said before that you'll be able to do everything through Google Tag Manager,
but actually, this is a snippet that you need to install into your HTML code.
It's probably the last tag that you need to install because we will be deploying all our
future tags through Google Tag Manager, but this is necessary for Google Tag Manager to
work correctly.
Now the instructions say that you should place the actual code beneath the opening body tag,
so it requires to make an actually code change on your website and implement this into your
HTML on your website, so for moresides, you would take the snippet and copy it over to
an email to send to your developer in order for him to install it, but make sure to give
him the instructions to place this beneath the opening body tag.
Another method would be to utilize plugins, and there are a lot of plugins out there that
handle the code implementation for your system so if you're on WordPress, there's a great
plugin by Thomas Geiger, which I'm gonna link up below.
There are also plugins to install this for Magento shops, Jumlah, and your lad, JS-driven
websites, but I encourage you to just head over to Google and input your CMS or your
shop system with the addition of Google Tag Manager installation, and you're most likely
to find instructions for this.
Now just to show you how it would work manually, we are gonna head over to our demo shop here
and this is a site that runs on WordPress.
WordPress is the most used CMS in the world, so I'm gonna demonstrate this based on WordPress,
but maybe your installation process will be different, depending on your CMS.
So in order to install this, we need to install it on all the pages and what we actually wanna
do is input it into the page source so it appears inside of this page source.
Since this is a CMS, it works with templates and theme files, so it will be able to place
the code one time and will automatically be inputted in all of the pages.
So how would we do that?
First of all, we need to have access to our back end system, which in WordPress is under
the WP Admin section.
You'll go into the Admin section of our site and under Appearance, we have an Editor where
we can edit these template files.
Then we will search for the right template file.
In our case, that would be the header.php back here.
And we can look through code and place it in the correct location under the opening
body tag which is in our case, right here.
Then we update the file, and we should be all set.
One warning here, the WordPress website, it is actually a recommended to install this
into atheme so the files don't get overwritten once the theme is updated.
I have skipped a step, but it's a recommended practice within WordPress.
Now we can look up, if everything worked fine, we can go back to our demo shop and actually
open up the page source and look for our GTM snippet, which is right here under the opening
body tag.
So this all works fine.
Now we wanna make sure that it's actually deployed on all the pages, so we go through
and look into the page source.
Another nicer way is to actually go into the preview in debug mode within our Google Tag
Manager, so let's do this really quickly.
We load our page here and we see that our debug console opens.
You can navigate to the next site and see how a debug console opens as well, and this
will be the case for every website that has Google Tag Manager installed correctly.
So if the Google Tag Manager console doesn't open, we haven't have installed Google Tag
Manager correctly on our website.
So it seems to be the case that all the websites are tagged correctly.
Obviously, this is something that you need to check more extensively in some cases, especially
if you're working with multiple systems on one website, but in our case, everything seems
to work fine.
We can also check with a browser extension, called the Google Tag Assistant that Google
Tag Manager's installed.
Again, this implementation most likely is gonna differ from your implementation on your
website if you have a different system running than WordPress.
Now let me mention some of the educators.
So sometimes you will have very restrictive content management systems or a website builder
where you want to install Google Tag Manager, and sometimes you run into the case, for example
here, on our Lead Pages account, you can actually edit the HTML, but they have an option to
install Tracking Codes.
Now in our case, we have two fields here.
One is the Head tracking code and the other is End-of-Body checking tag.
Unfortunately, there is no beneath the opening body tag box, so we had to adjust our Google
Tag Manager tracking.
What did we do?
We basically looked for the noscript tag and placed that in the actual body of our website
and the script tag of Google Tag Manager in the head section of Google Tag Manager.
So if you look at our Google Tag Manager code again, which you can find right up here.
We have taken the noscript part and placed that in the body section and the script part
in the head section, which is a legitimate practice to deploy Google Tag Manager because
Google Tag Manager will still be working as expected.
You just need to make sure to not place the noscript tag within the head section because
it will throw an error in certain browsers.
And when we go over, we can also look if this has been the deplugged correctly.
Reload this page.
And we see we have our certain tags here with Google Tag Manager and Google Analytics working
correctly.
Last but not least, before we get started with implementing any kind of tags, I would
recommend to publish a version so Google Tag Manager's actually initiated although there
are no tags or triggers or variables deployed at this moment in time.
And this is how you can set up Google Tag Manager on your website.
So there you have it.
Installing Google Tag Manager isn't that hard if you do it correctly.
If you want to test your knowledge after this lesson, head over to measureschool.com/lesson2
where we have a little bit of a quiz prepared for you and we'll send you some more resources
surrounding installation of Google Tag Manager.
Now on our next lesson, I'm gonna teach you a little bit more theory around Google Tag
Manager, what it's really all about, and how it fits into an organizational structure.
This is very important to understand before we start deploying any new tags on our website.
So join at the next lesson #3.
Just click over to the next video and I'm hopefully gonna see you there.
My name is Julian.
Til next time.