What Your Google Tag Manager Container Should Contain – Whiteboard Friday

What Your Google Tag Manager Container Should Contain – Whiteboard Friday

What Your Google Tag Manager Container Should Contain – Whiteboard Friday 1920 1276 DiTomaso

Posted by DiTomaso

Agencies, are you set up for ongoing Google Tag Manager success? GTM isn’t the easiest tool in the world to work with, but if you know how to use it, it can make your life much easier. Make your future self happier and more productive by setting up your GTM containers the right way today. Dana DiTomaso shares more tips and hints in this edition of Whiteboard Friday.

Click on the whiteboard image above to open a high resolution version in a new tab!

Video Transcription

Hi, Moz fans. My name is Dana DiTomaso. I am President and partner at Kick Point, which is a digital marketing agency based in Edmonton, Alberta. Today I’m going to be talking to you about Google Tag Manager and what your default container in Google Tag Manager should contain. I think if you’re in SEO, there are certainly a lot of things Google Tag Manager can do for you.

But if you’ve kind of said to yourself, “You know, Google Tag Manager is not the easiest thing to work with,” which is fair, it is not, and it used to be a lot worse, but the newer versions are pretty good, then you might have been a little intimidated by going in there and doing stuff. But I really recommend that you include these things by default because later you is going to be really happy that current you put this stuff in. So I’m going to go through what’s in Kick Point’s default Google Tag Manager container, and then hopefully you can take some of this and apply it to your own stuff.

Agencies, if you are watching, you are going to want to create a default container and use it again and again, trust me. 

Tags

So we’re going to start with how this stuff is laid out. So what we have are tags and then triggers. The way that this works is the tag is sort of the thing that’s going to happen when a trigger occurs. 

Conversion linker

So tags that we have in our default container are the conversion linker, which is used to help conversions with Safari.

If you don’t know a lot about this, I recommend looking up some of the restrictions with Safari tracking and ITP. I think they’re at 2.2 at the time I’m recording this. So I recommend checking that out. But this conversion linker will help you get around that. It’s a default tag in Tag Manager, so you just add the conversion linker. There’s a nice article on Google about what it does and how it all works. 

Events

Then we need to track a number of events. You can certainly track these things as custom dimensions or custom metrics if that floats your boat. I mean that’s up to you. If you are familiar with using custom dimensions and custom metrics, then I assume you probably know how to do this. But if you’re just getting started with Tag Manager, just start with events and then you can roll your way up to being an expert after a while. 

External links

So under events, we always track external links, so anything that points out to a domain that isn’t yours.

The way that we track this is we’re looking at every single link that’s clicked and if it does not contain our client’s domain name, then we record it as an external link, and that’s an event that we record. Now remember, and I’ve seen accidents with this where someone doesn’t put in your client’s domain and then it tracks every single click to a different page on your client’s website as an external link. That’s bad.

When you transfer from HTTP to HTTPS, if you don’t update Google Tag Manager, it will start recording links incorrectly. Also bad. But what this is really useful for are things like when you link out to other websites, as you should when you’re writing articles, telling people to find out more information. Or you can track clicks out to your different social properties and see if people are actually clicking on that Facebook icon that you stuck in the header of your website. 

PDF downloads

The next thing to track are PDF downloads.

Now there’s a limitation to this, of course, in that if people google something and your PDF comes out and then they click on it directly from Google, of course that’s not going to show up in your Analytics. That can show up in Search Console, but you’re not going to get it in Analytics. So just keep that in mind. This is if someone clicks to your PDF from a specific page on your website. Again, you’re decorating the link to say if this link contains a PDF, then I want to have this.

Scroll tracking

Then we also track scroll tracking. Now scroll tracking is when people scroll down the site, you can track and fire an event at say 25%, 50%, 75%, and 100% of the way down the page. Now the thing is with this is that your mileage is going to vary. You will probably pick different percentages. By default, in all of our containers we put 25%, 50%, 75%, and 100%. Based on the client, we might change this.

An advanced, sort of level up tactic would be to pick specific elements and then when they enter the viewport, then you can fire an event. So let’s say, for example, you have a really important call to action and because different devices are different sizes, it’s going to be a different percentage of the way down the page when it shows up, but you want to see if people got to that main CTA. Then you would want to add an event that would show whether or not that CTA was shown in the viewport.

If you google Google Tag Manager and tracking things in the viewport, there are some great articles out there on how to do it. It’s not that difficult to set up. 

Form submits

Then also form submits. Of course, you’re going to want to customize this. But by default put form submits in your container, because I guarantee that when someone is making your container let’s say for a brand-new website, they will forget about tracking form submits unless you put it in your default container and they look at it and say, “Oh, right, I have to edit that.” So always put form submits in there. 

Tel: & mailto: links

Of course you want to track telephone links and mailto: links. Telephone links should always, always be tappable, and that’s something that I see a lot of mistakes. Particularly in local SEO, when we’re dealing with really small business websites, they don’t make the telephone links tappable. It’s probably because people don’t know how. In case you don’t know how, you just telephone and then a colon and then the telephone number.

(555) 555-5555

That’s it. That’s all you need to do. Just like a link, except rather than going out to an HTTPS://, you’re going out to a telephone number. That is going to make your visitors’ lives so much easier, particularly on mobile devices. You always want to have those be tappable. So then you can track the number of people who tap on telephone links and people who tap on mailto: links exactly the same way. Now something that I do have to say, though, is that if you are using a call tracking provider, like CallRail for example, which is one that we use, then you’re going to want to shut this off, because then you could end up in double counting.

Particularly if you’re tracking every call made out from your website, then CallRail would have an Analytics integration, and then you would be tracking taps and you might also be tracking telephone clicks. So you can track it if you want to see how many people tap versus picking up the phone and calling the old-fashioned way with landlines. You can also do that, but that’s entirely up to you. But just keep that in mind if you are going to track telephone links.

All pages tracking

Then, of course, all pages tracking. Make sure you’re tracking all of the pages on your website through Google Analytics. So those are the tags. 

Triggers

Next up are the triggers. So I have a tag of external links. Then I need a trigger for external links. The trigger says when somebody clicks an external link, then I want this event to happen.

Clicks

So the event is where you structure the category and then the action and the label. 

External links

The way that we would structure external links, for example, we would say that the category for it is an external link, the action is click, and then the label is the actual link that was clicked for example. You can see you can go through each of these and see where this is happening.

Form submits

Then on things like form submit, for example, our label could be the specific form. 

Tel: & mailto:

On telephone and mailto:, we might track the phone number. 

PDFs

On other things, like PDFs, we might track like the page that this happened on. 

Page scroll

For scroll tracking, for example, we would want to track the page that someone scrolled down on. What I recommend when you’re setting up the event tracking for page scroll, the category should be page scroll, the action should be the percentage of which people scroll down, and then the label should be the URL.

Really think of it in terms of events, where you’ve got the category, which is what happened, the action, which is what did the person do, and the label is telling me more information about this. So actions are typically things like scroll, click, and tap if you’re going to be fancy and track mobile versus desktop. It could be things like form submit, for example, or just submit. Just really basic stuff. So really the two things that are going to tell you the difference are things like categories and labels, and the action is just the action that happened.

I’m really pedantic when it comes to setting up events, but I think in the long term, again, future you is going to thank you if you set this stuff up properly from the beginning. So you can really see that the tag goes to this trigger. Tag to trigger, tag to trigger, etc. So really think about making sure that every one of your tags has a corresponding trigger if it makes sense. So now we’re going to leave you with some tips on how to set up your Tag Manager account.

Tips

1. Use a Google Analytics ID variable

So the first tip is use a Google Analytics ID variable. It’s one of the built-in variables. When you go into Tag Manager and you click on Variables, it’s one of the built-in variables in there. I really recommend using that, because if you hardcode in the GA ID and something happens and you have to change it in the future or you copy that for someone else or whatever it might be, you’re going to forget.

I guarantee you you will forget. So you’re going to want to put that variable in there so you change it once and it’s everywhere. You’re saving yourself so much time and suffering. Just use a Google Analytics ID variable. If you have a really old container, maybe the variable wasn’t a thing when you first set it up. So one of the things I would recommend is go check and make sure you’re using a variable. If you’re not, then make a to-do for yourself to rip out all the hardcoded instances of your GA ID and instead replace it with a variable.

It will save you so much headaches. 

2. Create a default container to import

So the next thing — agencies, this is for you — create a default container to import. Obviously, if you’re working in-house, you’re probably not making Google Tag Manager containers all that often, unless you work at say a homebuilder and you’re making microsites for every new home development. Then you might want to create a default container for yourself. But agency side for sure, you want have a default container that you make so every cool idea that you think of, you think, oh, we need to track this, just put it all in your default container, and then when you’re grabbing it to make one for a client, you can decide, oh, we don’t need this, or yes, we need this.

It’s going to save you a ton of time when you’re setting up containers, because I find that that’s the most labor-intensive part of working with a new Tag Manager container is thinking about, “What is all the stuff I want to include?” So you want to make sure that your default container has all your little tips and tricks that you’ve accumulated over the years in there and documented of course, and then decide on a client-by-client basis what you’re going to leave and what you’re going to keep.

3. Use a naming scheme and folders

Also use a naming scheme and folders, again because you may not be working there forever, and somebody in the future is going to want to look at this and think, “Why did they set it up like this? What does this word mean? Why is this variable called foo?” You know, things that have annoyed me about developers for years and years and years, developers I love you, but please stop naming things foo. It makes no sense to anyone other than you. So our naming scheme, and you can totally steal this if you want, is we go product, result, and then what.

So, for example, we would have our tag for Google Analytics page download. So it would say Google Analytics. This is the product that the thing is going to go to. Event is what is the result of this thing existing. Then what is the PDF download. Then it’s really clear, okay, I need to fix this thing with PDF download. Something is wrong.

It’s kind of weird. Now I know exactly where to go. Again, with folders as well, so let’s say you’ve implemented something such as content consumption, which is a Google Tag Manager recipe that you can grab on our website at Kickpoint.ca, and I’ll make sure to link to it in the transcript. Let’s say you grab that. Then you’re going to want to take all the different tags and triggers that come along with content consumption and toss that into its own folder and then separate it out from all of your basic stuff.

Even if you have everything to start in a folder called Basics or Events or Analytics versus Call Tracking versus any of the other billion different tracking pixels that you have on your website, it’s a good idea to just keep it all organized. I know it’s two minutes now. It is saving you a lifetime of suffering in the future, and the future you, whether it’s you working there or somebody who ends up taking your job five years from now, just make it easier on them.

Especially too, when you think back to say Google Analytics has been around for a long time now. When I go back and look at some of my very, very first analytics that I set up, I might look at it and think, “Why was I doing that?” But if you have documentation, at least you’re going to know why you did that really weird thing back in 2008. Or when you’re looking at this in 2029 and you’re thinking, “Why did I do this thing in 2019?” you’re going to have documentation for it. So just really keep that in mind. 

4. Audit regularly!

Then the last thing is auditing regularly, and that means once every 3, 6, or 12 months. Pick a time period that makes sense for how often you’re going into the container. You go in and you take a look at every single tag, every single trigger, and every single variable. Simo Ahava has a really nice Google Tag Manager sort of auditing tool.

I’ll make sure to link to that in the transcript as well. You can use that to just go through your container and see what’s up. Let’s say you tested out some sort of screen recording, like you installed Hotjar six months ago and you ended up deciding on say another product instead, like FullStory, so then you want to make sure you remove the Hotjar. How many times have you found that you look at a new website and you’re like, “Why is this on here?”

No one at the client can tell you. They’re like, “I don’t know where that code came from.” So this is where auditing can be really handy, because remember, over time, each one of those funny little pixels that you tested out some product and then you ended up not going with it is weighing down your page and maybe it’s just a couple of microseconds, but that stuff adds up. So you really do want to go in and audit regularly and remove anything you’re not using anymore. Keep your Google Tag Manager container clean.

A lot of this is focused on obviously making future you very happy. Auditing will also make future you very happy. So hopefully, out of this, you can create a Google Tag Manager default container that’s going to work for you. I’m going to make sure as well, when the transcript is out for this, that I’m going to include some of the links that I talked about as well as a link to some more tips on how to add in things like conversion linker and make sure I’m updating it for when this video is published.

Thanks so much.

Video transcription by Speechpad.com

Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don’t have time to hunt down but want to read!

* Checkbox GDPR is required

*

I agree

Will you like to book a consultation today?

We promise you’ll be glad to have us as the only premium website developer you’ve ever had!

Will you like to book a consultation today?

We promise you’ll be glad to have us as the only premium website developer you’ve ever had!

Bear Design - WordPress Development

Bear Design provides website development and design, creating content uploaded websites and improving web page placements and web traffic. Bear Design websites are unique, easy to use and responsive. Site owners can easily edit the content, or can trust the Bear Design & Communications to keep them up to date and supply quality content regularly.


GET IN TOUCH
160 City Road, EC1V 2NX London, United Kingdom
Monday – Thursday: 9:00 AM – 5:00 PM
Friday: 9:00 AM – 2:00 PM

WE ARE IN LONDON

Bear Design - WordPress Development

Bear Design provides website development and design, creating content uploaded websites and improving web page placements and web traffic. Bear Design websites are unique, easy to use and responsive. Site owners can easily edit the content, or can trust the Bear Design & Communications to keep them up to date and supply quality content regularly.


WE ARE IN LONDON

GET IN TOUCH
160 City Road, EC1V 2NX London, United Kingdom
Monday – Thursday: 9:00 AM – 5:00 PM
Friday: 9:00 AM – 2:00 PM

Bear Design - WordPress Development

Bear Design provides website development and design, creating content uploaded websites and improving web page placements and web traffic. Bear Design websites are unique, easy to use and responsive. Site owners can easily edit the content, or can trust the Bear Design & Communications to keep them up to date and supply quality content regularly.


GET IN TOUCH
160 City Road, EC1V 2NX London, United Kingdom
Monday – Thursday: 9:00 AM – 5:00 PM
Friday: 9:00 AM – 2:00 PM

WE ARE IN LONDON

© Made with by Bear Design

© Made with by Bear Design

    We are Bear Design

    WE DESIGN

    YOUR WORLD

    Bear Design & Communications Ltd.

    Address : 160 City Road, EC1V 2NX London, United Kingdom
    Phone : +36 702 448 100
    Email : [email protected]

    Opening hours :
    Monday – Thursday: 9:00 AM – 5:00 PM
    Friday: 9:00 AM – 2:00 PM

    Are you sure?
    You must approve our cookie policy to use our site. I you refuse it you will redirect to the Google.
    Refuse
    Approve Cookies
    Cookie Policy
    Cookie Policy
    This Bear Design Cookie Policy (“Policy”) outlines the general policy, practices, and types of cookies that Bear Design And Communications Ltd.. (“Bear Design”, “we”, “us” or “our”) may use to improve our services and your experience when visiting our websites.Cookies are small pieces of text used to store information on web browsers. They’re used by many websites to store and receive identifiers and other information on devices, such as a handheld phone or computer. Our site and services use cookies and other similar technologies (collectively in this Policy, “cookies”), in order to provide a better service to you and to generally improve our sites and services. For example, we may use cookies to help direct you to the appropriate part of our websites, by indicating that you are a repeat visitor. We may also use information to present you with services that are matched to your preferences.Some portions of our websites are functional without cookies, and you may generally choose whether to accept cookies. Most web browsers are set to accept cookies by default, however, you may be able to delete cookies yourself through your browser’s cookie manager. To do so, please follow the instructions provided by your web browser. Please note that disabling cookies will reset your session, disable auto-login, and may adversely the availability and functionality of our websites and the services we can provide to you.As part of our services, we may also place cookies on the computers of visitors to websites protected by Bear Design. We do this in order to identify malicious visitors, reduce the chance of blocking legitimate users, and to provide customized services.Our websites use first party cookies (i.e., cookies set directly by Bear Design) as well as third party cookies, as detailed in the table below.
    Type of CookieWhy we use these cookiesWho serves them and where can you find out more information?
    Analytics and research of usersThese are used to understand, improve, and research users visiting //beardesign.me and their needs for our product offerings. For example, we may use cookies to understand what pages a user browses before submitting a sales request form. We do not share information about this analysis with any third parties.Selected third parties listed and defined as follows:
    • Google Analytics – Web traffic tracking – //www.google.com/policies/privacy/
    • Bing – Conversion tracking from Bing ads – https://advertise.bingads.microsoft.com/en-us/resources/policies/microsoft-bing-adsprivacy-policy
    • Doubleclick – Google advertising platform that analyzes browsing activity across website to establish user profile – //www.google.com/policies/technologies/ads/
    • Twitter – Analyzes browsing activity across website to establish user profile – https://support.twitter.com/articles/20170514
    • Facebook – Analyzes browsing activity across website to establish user profile – https://www.facebook.com/policies/cookies/
    A user can delete these cookies through browser settings.
    Improving Website experienceThese provide functionality to help us deliver a better user experience for our website. For example, cookies help facilitate chats with our sales representatives, allow you to search the website, and deliver the user quickly to their intended website location.1st party and selected third parties as defined below:
    • __cfduid 3rd party cookie – This cookie is strictly necessary for Cloudflare’s security features
    • __hssc Cookie for keeping track of sessions. This is used to determine if we should increment the session number and timestamps in the __hstc cookie. It contains: the domain, viewCount (increments each pageView in a session), session start timestamp. (Expires: 30 min)
    • __hssrc Whenever HubSpot changes the session cookie, this cookie is also set. We set it simply to the value “1”, and use it to determine if the user has restarted their browser. If this cookie does not exist when we manage cookies, we assume it is a new session. (Expires: None. Session cookie)
    • __hstc The main cookie for tracking visitors. It contains: the domain, utk (see below), initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session) (Expires: 2 years)
    • hsfirstvisit This cookie used to keep track of a user’s first visit. (Expires: 10 years)
    • hubspotutk This cookie is used for to keep track of a visitor’s identity. This cookie is passed to HubSpot on form submission and used when deduplicating contacts. (Expires: 10 years)
    • wordpress_ WordPress cookie for a logged in user.
    • wordpress_logged_in_ WordPress cookie for a logged in user.
    • wp-settings- WordPress also sets a few wp-settings-[UID] cookies. The number on the end is your individual user ID from the users database table. This is used to customize your view of admin interface, and possibly also the main site interface.
    • wp-settings-time- WordPress also sets a few wp-settings-{time}-[UID] cookies. The number on the end is your individual user ID from the users database table. This is used to customize your view of admin interface, and possibly also the main site interface.
    • __cfduid 3rd party cookie – This cookie is strictly necessary for Cloudflare’s security features
    A user can delete these cookies through browser settings.
    LAST UPDATE: 24.01.2018, LONDON
    Approve
    Refuse
    Cookie Policy
    This Bear Design Cookie Policy (“Policy”) outlines the general policy, practices, and types of cookies that Bear Design And Communications Ltd.. (“Bear Design”, “we”, “us” or “our”) may use to improve our services and your experience when visiting our websites.Cookies are small pieces of text used to store information on web browsers. They’re used by many websites to store and receive identifiers and other information on devices, such as a handheld phone or computer. Our site and services use cookies and other similar technologies (collectively in this Policy, “cookies”), in order to provide a better service to you and to generally improve our sites and services. For example, we may use cookies to help direct you to the appropriate part of our websites, by indicating that you are a repeat visitor. We may also use information to present you with services that are matched to your preferences.Some portions of our websites are functional without cookies, and you may generally choose whether to accept cookies. Most web browsers are set to accept cookies by default, however, you may be able to delete cookies yourself through your browser’s cookie manager. To do so, please follow the instructions provided by your web browser. Please note that disabling cookies will reset your session, disable auto-login, and may adversely the availability and functionality of our websites and the services we can provide to you.As part of our services, we may also place cookies on the computers of visitors to websites protected by Bear Design. We do this in order to identify malicious visitors, reduce the chance of blocking legitimate users, and to provide customized services.Our websites use first party cookies (i.e., cookies set directly by Bear Design) as well as third party cookies, as detailed in the table below.
    Type of CookieWhy we use these cookiesWho serves them and where can you find out more information?
    Analytics and research of usersThese are used to understand, improve, and research users visiting //beardesign.me and their needs for our product offerings. For example, we may use cookies to understand what pages a user browses before submitting a sales request form. We do not share information about this analysis with any third parties.Selected third parties listed and defined as follows:
    • Google Analytics – Web traffic tracking – //www.google.com/policies/privacy/
    • Bing – Conversion tracking from Bing ads – https://advertise.bingads.microsoft.com/en-us/resources/policies/microsoft-bing-adsprivacy-policy
    • Doubleclick – Google advertising platform that analyzes browsing activity across website to establish user profile – //www.google.com/policies/technologies/ads/
    • Twitter – Analyzes browsing activity across website to establish user profile – https://support.twitter.com/articles/20170514
    • Facebook – Analyzes browsing activity across website to establish user profile – https://www.facebook.com/policies/cookies/
    A user can delete these cookies through browser settings.
    Improving Website experienceThese provide functionality to help us deliver a better user experience for our website. For example, cookies help facilitate chats with our sales representatives, allow you to search the website, and deliver the user quickly to their intended website location.1st party and selected third parties as defined below:
    • __cfduid 3rd party cookie – This cookie is strictly necessary for Cloudflare’s security features
    • __hssc Cookie for keeping track of sessions. This is used to determine if we should increment the session number and timestamps in the __hstc cookie. It contains: the domain, viewCount (increments each pageView in a session), session start timestamp. (Expires: 30 min)
    • __hssrc Whenever HubSpot changes the session cookie, this cookie is also set. We set it simply to the value “1”, and use it to determine if the user has restarted their browser. If this cookie does not exist when we manage cookies, we assume it is a new session. (Expires: None. Session cookie)
    • __hstc The main cookie for tracking visitors. It contains: the domain, utk (see below), initial timestamp (first visit), last timestamp (last visit), current timestamp (this visit), and session number (increments for each subsequent session) (Expires: 2 years)
    • hsfirstvisit This cookie used to keep track of a user’s first visit. (Expires: 10 years)
    • hubspotutk This cookie is used for to keep track of a visitor’s identity. This cookie is passed to HubSpot on form submission and used when deduplicating contacts. (Expires: 10 years)
    • wordpress_ WordPress cookie for a logged in user.
    • wordpress_logged_in_ WordPress cookie for a logged in user.
    • wp-settings- WordPress also sets a few wp-settings-[UID] cookies. The number on the end is your individual user ID from the users database table. This is used to customize your view of admin interface, and possibly also the main site interface.
    • wp-settings-time- WordPress also sets a few wp-settings-{time}-[UID] cookies. The number on the end is your individual user ID from the users database table. This is used to customize your view of admin interface, and possibly also the main site interface.
    • __cfduid 3rd party cookie – This cookie is strictly necessary for Cloudflare’s security features
    A user can delete these cookies through browser settings.
    LAST UPDATE: 24.01.2018, LONDON
    Approve
    Refuse
    Welcome
    We use cookies to ensure that we give you the best experience on our website. Before you continue browsing you must approve or refuse our cookie policy.
    Approve
    Refuse
    Cookie Policy