Install Google Analytics with Google Tag Manager – 2020 Updated

Installing Google Analytics with GTM isn’t hard. In this video, I will give you a simple step by step procedure to complete the setup of Google Analytics Pageview Tracking on your website.

Remember: You need to already have GTM setup. If you don’t have it installed follow this tutorial.

Introduction To Google Tag Manager 2020 | Lesson 1 (GTM for Beginners)

In this video, I’m going to show you how you can install Google analytics with the help of Google tag manager onto your website. All and more, coming up.

Hey there, measuregeeks. Julian here back with another video. Today, we want to talk about how we can install Google analytics with the help of Google tag manager onto your website. Now this is a beginner tutorial so let’s jump right into it. Here we are on our demo shop where I already have Google tag manager installed.

If you don’t have Google tag manager installed yet, then check out our tutorial down below which will teach you just that. If you are not sure if you have Google tag manager installed, then go over to your Google tag manager account and click on preview.

This will put our browser and only our browser into a special state and if you go back to our page and reload our page, then we should see our preview and debug console down here. This is only for us on our browser right now and we can see all the different tags that fire on our page.

Step-by-Step: How to Install Google Analytics with Google Tag Manager

In our case there is not yet any tag, but if you would have a Google analytics tag, you would see it right here. The next step that we now made sure that Google tag manager is installed is to find out our tracking ID of Google analytics. Now another prerequisite is that you have a Google analytics account. If you don’t have one yet, you can sign up for free. And then inside of the interface you can go down to this cog wheel which also says admin section and then under the admin section under your property settings right here the go to tracking information and then tracking code. Now here you see the tracking code that needs to be deployed on all the pages of your website in order for Google analytics to do pageview tracking correctly.

We will not use this global site tag that is deployed maybe on your website. We will deploy everything to Google tag manager and therefore we just need to have the tracking ID up here. So copy the tracking ID and then we can go over to Google tag manager. Here in our Google tag manager account, we now want to create a new tag.

Create Google Analytics Tag

For that we’ll go over to tags and then click on new once it loads right here and we go first with tech configuration and then we’ll see all our different tracking templates that Google tag manager provides so we don’t have to implement any kind of code. We just choose a template. For us it would be the Google analytics universal analytics template. It will give us some fields to fill out. Now the first field here is the track type. What kind of interaction do we want to send over? In our case, it would just be pageview tracking that we want to deploy on all the pages.

Create Google Analytics Settings Variable

And then we’ll choose our Google analytics settings variable. Now this is where we would put an hour tracking ID. If you already see something here, you might be able to use it, but we don’t have anything here. So we’ll go with new variable and then in this new variable we can put in our tracking ID, copy tracking ID right here.

You can leave all the other settings untouched and we just give it a name. In my case, I usually just choose the same tracking ID right here. So if I have multiple tracking IDs and multiple Google analytics settings variable I would be able to identify this right away.

Choose Trigger

So I’m going to save this and now all we need to do is to define a trigger. Now trigger defines when you want to actually deploy this tag. You can choose to deploy it on all pages, on only on certain pages. As we have already said, we want to go with all pages. So I’m going to click on this field here and we have a predefined trigger. If we don’t really have to change at all, we just click on it and it will give us, and now it’s now attached to our trigger, our tag. And this trigger is the all pages trigger, which will fire on pageview.

All right, now we all we need to do is to give this still a name. I usually choose the tool so Google analytics. What kind of tag it is a pageview tag and then the scope of all, all pages. Let’s save this and we have a nicely named here in our tag list. So this is in here and now we can test this off.


We’ll go through the QA section. So we’ll refresh our preview and debug mode right here and then go over to our page directly back and reload. And now we should see in our preview debug mode. Yes, our Google analytics tag fired. And if you go to another page, for example, this is the same page, it should fire again. So we making sure it’s firing on all the pages and you can do spot checks and go through your website in order to see this.

Now the tag has been deployed. Has it actually had an impact on the tool itself? Well there are two ways to make sure to go through the chain, so to say. One is to use an extension in Chrome called the Google tag assistant. Right here we can see inside of the tag assistant, which tags fired Google tag manager and Google analytics. Don’t worry if this is blue and not green nonstandard implementation. Well the tag assistant doesn’t quite recognize Google tag manager yet. Hopefully that will fix this. And here we see that Google analytics, the pageview request has been transmitted. Now the ultimate test is obviously was it received by the tool itself. And that is something we can see in Google analytics itself by going into our reporting section here under real time and we have different reports. I’m just going to go with the overview report and here we should see any kind of interactions that happened in the last second.

So we already see here I was on product category music. Now if I just go over to the blog for example, you hopefully see another page view in a second. This can take a few seconds. If you don’t see anything here that might be because your account is fairly new. It might also have to do something with your tracking implementation. It could be something wrong with it as well or any filters that you might have installed on Google analytics. So definitely make sure to check this. This works all right right here and we should also be able to go to any kind of other website, on our site on our website and the page path should change and we should see another pageview here right now. So this seems to be working just fine and we have deployed Google tag manager correctly with Google analytics. Now be aware that this is not yet live on your website, it just fires for you right now because we are in a special mode.

Publishing GTM Changes

The preview mode, this deploy is only on your browser. In order to take this life, you need to publish a version and for that you go back to the page here and click on the submit button and then you will enter a name for your version where for example you have changed something like edit, Google analytics, pageview tracking and then we can publish this.

This will put in another version for us. So we are on version three because I’ve done some testing, but you can go back to any kind of other version if anything went wrong. Now if we’ll go back to the workspace here and leave my preview and debug mode on our page. Should we reload this? Not have our preview and debug mode anymore, but inside of our tag assistant we can still see that Google analytics is deployed correctly and also inside of analytics, we would see a new pageview.

And that’s how you can deploy Google analytics via Google tag manager.


Alright, this is already it with this little video. Now I sometimes get the question, what do I do with any kind of implementation that I’ve done beforehand? So if you have any kind of Google analytics plugin installed on your WordPress site, for example, or you have the actual Gtag or Google analytics tag inside of your theme files and it’s still there.

Well now we are deploying our tracking through Google tag manager and we wouldn’t necessarily need this implementation anymore. I would actually urge you to check whether the Google analytics tag fires twice because that could mean double tracking and then you should get rid of your hard coded implementation of the Gtag or of the Google analytics tracking script that you might still have on your page. Everything should now be deployed through Google tag manager.

This is already it with this video. If you liked it, I love a thumbs up. If you don’t like it, two thumbs down. And if you have any more questions, leave them in the comments down below. Now, if you enjoyed this video, then I’d love for you to subscribe to our channel right here and also check out this video right here, which is also pretty cool. Now my name is Julian. Till next time.


Master Data & Analytics with Measuremasters

Exclusive Courses & Workshops | Ongoing Troubleshooting | Support Resources, Tools & much more
Newest Most Voted
Inline Feedbacks
View all comments
1 year ago

Really easy to follow your advice. Thanks for the video.

1 year ago

Why would we want to install Analytics with GTM instead of just with GA as normal? What is the benefit?

Blog Categories

Join 30,000+ marketers getting exclusive resources and our latest content!

now it's time to

Start measuring like a master

Itching to jump into the world of MeasureMasters? This is what you have to look forward to.