SMA Marketing Blog

The SMA Marketing Blog

An Introduction to Google Tag Manager

Feb 12, 2018
Share this Article:

Google Tag Manager is more than just a tool to manage your scripts. Tag manager allows a website owner to extract powerful insight from their users without having to touch the source code of the website. In this video, I'll explain what Tag Manager is, how to get started and give some insight into tags, triggers and variables.

 

 

Video Transcript: 

Hey, what's up, everybody? Welcome to Hack My Growth. In this episode, we're going to be looking at Google Tag Manager and how we can use it to get more out of our data.

Hey, thanks so much for checking out this video. If this is your first time watching, or maybe you've been watching a while and haven't yet subscribed, please do so now. We would love to have you join our community here on YouTube.

The video today is going to be an introduction to Google Tag Manager. How can we use it to get more out of our data, but, also, how can we use it to better optimize our site and really keep track of all the tags that we have installed?

What is Tag Manager?

Well, in short, it's a tag management system, but, really, what it does is it allows us to quickly and easily update our tags and code snippets on our website or mobile app. These are traffic codes or marketing optimization codes. You can add and update these tags straight within Tag Manager without having to actually touch the source code. This works with Google products, like AdWords or Google Analytics. There's also a number of third-party sources, and you even have the ability to add your own custom tags into Tag Manager. 

The big issue here is it helps reduce errors and it frees you from having to really involve a developer or having some development background in order to configure your tags.

What's a Tag?

Well, a tag is just a snippet of code that sends information to a third party, like Google. It's that tracking code that you get with Google Analytics that allows you to send data back to your analytics software so you know what people are doing. With Tag Manager, you don't have to maintain all of these code snippets in your source files. You don't have to put them in your header yourself and have your header really stacked with all of these analytic tags or analytic code snippets. Instead, you just put them inside your container, and then you specify when you want these codes to fire and you can just manage them from inside of Tag Manager. There are two code snippets, one in the header and one just at the body tag, and then you're able to put all of that other tracking information within that container.

If you have a website, it's pretty easy to set up. You go to TagManager.Google.com. If you already have an account with Google, like an Analytics acct, you just sign in with that. If you don't, you can go ahead and create a new account. If you look there, it's always going to be at the top right-hand side. You also have the button right in the middle of the screen.

What you do for a new site is you create a container and your container is what's going to hold all of your tags. You want to add in your account name. Typically, this is going to be your website address. You're not going to need HTTPS. You're just going to need your naked URL. You also don't usually want to have any strings at the end, just your specific domain. Once you add that in there, hit continue. Then you're going to want to hit Set Up Your Container.

There are a couple different things you can use Tag Manager with. You can do it on a typical website. You can use it with an iOS application or an Android application, and they also have a specific Tag Manager or container for AMP pages, so accelerated mobile pages.

Once you've chosen what you want to do, in this case, we're talking more about the website things, we would just hit create. Again, here, we've set up our account name, the container name, and we hit create. Here is the code that you're going to have to install. If you have some development background, you probably are going to have a very easy time with installing this code. If you're not really sure where these are located, there are a lot of really cool plugins that you can use, like WordPress has one called Header Footer, which is a really good plugin, which allows you to insert code in the head tag, as well as the body tag or the footer tag. There are also some Tag Manager plugins. If you can put in the source code, I recommend that you do that. It's just going to be a little bit more in your control because sometimes plugins can break, and if the plugin breaks, you're going to lose all the ability to collect the data. If you can put in the source code, I highly recommend you do that.

As you see here, the top code actually goes at the highest point within the head of your page if possible, and then, additionally, you want to place the second code right after the opening body tag.

What does this really look like?

You might be wondering. Here we go. This is a code actually installed. Tag Manager installed, and the one on the left is going to be right there at the top of the page so you can see the HTML page was opened up. We have the opening header tag, and then right there at the top, we put the Tag Manager code, and then, once again, we find it here in the body of the site, right when that body tag opens up. We're going to drop that right in there. Once you've done that, you've installed your container.

On its own, it's not going to start collecting data. There are some more steps that you need to take in order to start collecting the data that you really want to collect. This is where tags, triggers, and variables come in. A tag is a snippet of code that executes on a page. It can have a number of different uses, but, they're designed to send information to a third party. Maybe you want to send information to Google Analytics. Maybe you need to send information to Google Optimize or maybe to Hotjar or one of these other tools that you're using. Tags are then executed or fired when a page loads or somebody takes some sort of action. You can have a tag fire when somebody visits a page or you can have it fire when somebody clicks on a certain element or takes a specific action on your webpage.

The typical tag that gets set up is your Google Analytics Tag, and you're going to have that fire on all pages, but you could also do some event tracking. Maybe you wanted to click Contact Us link behavior. You would have that event tag triggered on when somebody clicks your Contact page.

Here's a Google Analytics Tag configuration. You would just select Google Analytics, very easy. Then they're going to have you just put in your UA code, which is that part of your tracking code that identifies your specific Google Analytics account, and then you're going to have a trigger. Without a trigger, the code's not going to fire, but we want it to fire on every page because we want to track what people are doing on every page, make sure that we're getting that Google Analytics data, so then you would just add the default all-page trigger. These are some basic tags and triggers that are built right into the program. It's really just clicking and then, once you have it installed or configured, you hit update, and now your Google Analytics tag will be on your website.

A trigger, like we talked about, it's a condition that evaluates to either true or false. Did this happen or did it not? Did they visit the page or did they not visit the page? If they did visit the page, then it's going to go. If they don't visit the page, it's going to not trigger it. It does this by configuring the value and a variable, which is the value that you specify when you want a trigger.

Let's say instead of wanting it to go on all pages, you only want it to fire on your Contact Us page. Well, you would add what's called a variable to that trigger, saying, "Only fire this trigger when somebody visits our Contact Us page." This is really cool because you can identify or define variables to really meet your needs and track specific behavior how you want to track it on your website and on your users or on a specific instance. This is a really cool way to narrow or put constraints around the way you're collecting your data to make sure you're getting the data that actually matters to you and your business.

Here is a built-in variable. We can just click this one. This is on all full URLs. This is a full URL. This is really going to not limit any page, but I could reconfigure this variable and copy it and then create one for the Contact Us page or the About Us page, and this is going to allow me to constrain how something gets fired. Maybe you only want to capture an event on a certain page. Then you would use a variable. Most of the time, on these Google Analytic scripts, you're going to want to fire across the page, but there are times and instances where you're going to need to use variables in order to track user behavior, YouTube clicks, file downloads, things of that nature, which are going to allow you to collect some cool data.

There's also something called the data layer, and it's the object that can be configured to contain information that you want to pass to Tag Manager. The data layer is where the stuff is, the data is, and you can configure this in Google Tag Manager, as well, to capture the values within that data layer for later use.

In order to do this, you need to set up some variables and then have an event that is pushed into your Analytics system. Here is one of the data layers that we have set up, and this data layer is built for Google Analytics event tracking for YouTube. We are using this data layer to push attributes on a video URL into our Google Analytics event. This allows us to track pauses and plays. It allows us to track how long somebody's watched a video, things of that nature, so we can see how well our videos are performing within an embed layer on our webpage. 

As we recap this, Google Tag Manager is a really powerful tool. It's a tag manager script that allows us to easily update our tags, keep everything under one roof and really track user behavior. It allows us to get more insights out of our users because we can set up these really cool events very quickly. You can do event tracking without tag manager, but tag manager is going to make it a lot easier and you're not going to have to have a developer involved in order to get everything marked up the right way.

I hope you guys got a little bit more insight into Google Tag Manager. Now, I recommend you sign up and start using it and testing things out. It has a lot of cool test-out features, preview features, so you don't have to push anything live and you can see if it's working or not. If you have any questions, please comment below. We would love to help you out, point you in the right direction. Until next time, Happy Marketing.

marketing metrics

Share this Article:
Ryan Shelley, CPBI

By Ryan Shelley, CPBI

Ryan is passionate about helping companies make a more personal connection online with their customers and prospects. He is a regular contributor to Search Engine Land, the largest and most popular SEO news site on the web. His works has also been featured on the HubSpot Blog, Business2Community and by LinkedIn Marketing solutions.

Blog Comments

Get Awesome Content Delivered Straight to Your Inbox!

LEARN
Help us Help Others

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.

Related Post