VIDEO: How to Setup Google Analytics Using Google Tag Manager

Google Analytics using Tag Manager Video Transcript:

 

How’s it going everyone this is Danny Lambert president and co-founder of Plush Republic Digital Marketing. I’m going to be running you through how to set up Google Analytics Via Tag Manager today. If you’re not familiar with tag manager it’s a software via Google that allows you to easily implement tags within your website and apps so you don’t have to adjust the code every time you want to do it. It allows you to test it in workspaces in preview before launching it in a live environment. It’s very powerful and I highly suggest that you implement it. So the precursors to this are that you do have a Google analytic account set up. If you don’t go to analytics.google.com and set that up first. I’ll have another video that I’ll share in the description on how to do that but say you have already had that set up you’ll go to tagmanager.google.com. So this is actually my website’s account but I will create a secondary container to show you how this works. So you come in, you create your account, click right here. Call this Test Company. I can choose to share my data with Google which is just for benchmarking purposes. It in no way affects your account that you create in here. So click continue, test and select what you want is an iOS, an Android, AMP or Web. I’ll click Web and create this and then you’ll need it to agree to Google’s Terms of Service.

Now we’re in and it will present you with two pieces of code the first has to go at the top of your head file and your HTML and then one right below the opening body tag. So I’m a WordPress user I will show you how you would implement that within WordPress should you be using the CMS if not confer to the documentation for your CMS or to your web developer. I’ll click into appearance and editor and then I will go into header.php. You’ll notice that I already have Google Tag Manager right there below the head and then right after the opening body I have that second script. So those are the two we discussed here. Once you have that implemented you’re good to go. You click okay and this is where the fun begins.

I now have to create a tag and all the tags that we create within tag manager will be put directly into that container that we just created on this site. But the first thing I want to do is set up one variable so I click variables and I’ll hit new. What this is going to allow me to do is take my tracking ID that I have in my Google analytics account, pop in here and I can reference this as a constant at any time. I won’t have to type it in or look it up every time I want to use it. So if you’re in your Google analytics account click in the admin under the property that you want to use click property settings and then here’s that tracking ID. Let’s take it, copy it, named this GA tracking ID or whatever you prefer to call it. Select a constant and you paste that in there. Once I click save they want me to publish my changes which I will and I’ll adjust it so I had my versioning if I ever want to go back and check what I changed. (Add tracking ID variable). Now I published it. We’ll see in a second what this variable allows us to do if I hop back into my workspace I now need to add a new tag. I’ll call this GA Tag or whatever you want to name it and I can click universal or classic. Hopefully you guys are on universal if you’re not I can send some documentation through the link description, sorry, the video description on how to migrate from classic to universal. I highly suggest you are on universal analytics. So I’ll click this and now I’m asked for that tracking ID. I could either come and paste this everytime I want to use it but since I set up that variable I can just click that button and reference that constant and it does all that for me. So I want to track on all pageviews it gets very powerful and I have some other videos that I’ll be sharing on how you can do the event track and forms, all that good stuff but for just general tracking I want pageviews.  Within more you have a whole bunch of custom dimensions you can set up in fields. If you have ecommerce please enable ecommerce and if you want to do display advertising allow that here and then the last section to setup is triggering and I want to trigger this on all website pages. It’s just saying that it will trigger any time someone views the page which is obviously what you want for your general GA Tag. After that you click save and you would publish this similar to how I did the other. I’m going to hop into my other account where it’s actually active on my website. So I’ll go back to the workspace. It’s on accounts, hop into my actual Plush Republic one because I want to show you how you can preview your tags. So you notice this publish button I had before I have all the tags I have live on my site.

Now if I want to preview how this is working you can drop down here, click preview and now it’s in preview mode. So you’ll visit your site in this same browser and it’ll allow you to see if it’s working properly. So what I like to do is share this preview, copy this code and then open a new incognito window. That’s where all my cache is cleared I can just see this. I’m in here it says I’m previewing the container it lets me go to my website and it should open up this at the bottom. This is telling me every single one of the tags that is firing on my site. So if you have tags only fire on specific pages this is great to go to those pages and make sure that everything is firing according to how you set it up. I have Facebook, GA, Google Optimize and all of these should match up to the ones that I have in my account and they do so that means we are good to go. When I’m done with that I can just click leave preview mode and now we have GA up and running and that’s triggering on every page of our site. Another good way to check is once you have that up if you go into your analytics account, you go to real-time, overview, and you can just make sure that it’s collecting data. I’m active on the site right now. Obviously on this page the only person on it in this environment and that would be me so I know that my tags are firing the way that I want them to.

 

Subscribe to Our Blog and Receive the Latest News in Digital Marketing

Leave a Reply

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