But by tagging your site and using Google Tag Manager in conjunction with Google Analytics, you’re able to collect much more data than you can otherwise. You’ll still need someone to add the container code to each page of your site. Containers When you start working with GTM, the first thing you’ll need to do is create a container. After creating a new container, GTM gives you some code to add to your site. You can find more built-in variables by clicking the “Configure” button. Data layers Tags need information to know whether or not they should fire, but how (or where) do they get that information? Once the container code has been added, you’re able to start creating tags. If you don’t see the type of tag you want to create listed, choose “Custom HTML” to add your own code. Next, you’ll need to create at least one trigger. Once your tag and trigger have been configured, save it and you can either keep working by creating more tags or you can preview your tag and make sure it’s working correctly before publishing it.
Digital marketing thrives on data. No matter what type of site you have, whether it’s a large e-commerce site, a personal website, or a site for a small business, it’s essential to understand how people interact with your site. Google Analytics can provide a lot of the important insights you’re looking for, but when used alone, it does have its limitations. But by tagging your site and using Google Tag Manager in conjunction with Google Analytics, you’re able to collect much more data than you can otherwise.
Tags are snippets of code which are added to a site to collect information and send it to third parties. You can use tags for all sorts of purposes, including scroll tracking, monitoring form submissions, conducting surveys, generating heat maps, remarketing, or tracking how people arrive at your site. They’re also used to monitor specific events like file downloads, clicks on certain links, or items being removed from a shopping cart.
Sites commonly use several different tags and the amount of code needed to create them all can be pretty overwhelming, especially if you’re trying to add or edit tags by going directly into the site’s source code. Google Tag Manager is a tool with a user-friendly, web-based interface that simplifies the process of working with tags. With GTM, you’re able to add, edit, and disable tags without having to touch the source code.
While GTM is, obviously, a Google product, it’s hardly limited to just working with tags for other Google services like AdWords or Analytics. You can use it to manage many different third-party tags, including Twitter, Bing Ads, Crazy Egg, and Hotjar, just to name a few. If there’s another tag which doesn’t have a template in GTM, you can add your own custom code. There are only a few types of tags GTM doesn’t work well with.
The pros and cons of GTM
Lessens reliance on web devs
By far, the biggest benefit to Google Tag Manager is that it makes it easier for marketers to implement tags without having to rely on web developers to do it for them. Developers are usually busy with other high-priority projects, so tagging often ends up on the back burner. But since Google Tag Manager helps you avoid touching the source code, marketers can quickly add and make changes to tags on their own. This is a big advantage if, for example, you only need to use a tag to collect data for a very brief amount of time. Without GTM, there’s a good chance that it would take longer for the tag to be added than it would actually be live for.
Still requires some technical implementation
Although GTM helps reduce the reliance on developers, it doesn’t completely eliminate it. You’ll still need someone to add the container code to each page of your site. And while GTM has plenty of tag templates to choose from which are easy enough for a non-developer to work with, more complex customized tags will likely require the help of someone who really understands coding. If you have existing tags that were manually added to your site’s source code, those will need to be removed first so that you don’t end up with duplicate data.
Most businesses can benefit from using it
Businesses of any size can potentially benefit from GTM. Since GTM makes it so much easier to add and edit tags without a developer, it’s great for smaller businesses that might have limited access to technical support. And since sites for enterprise-level businesses can easily use dozens of tags, GTM makes it easier to manage them all and improves site speed by helping them load more efficiently.
Tags can slow down site speed if fired synchronously
One issue with traditional tracking tags is that if they fire synchronously, they can slow down site speeds. When tags fire synchronously, one tag being slow to load slows down all the other tags that are waiting on it. And the longer a site takes to load, the more likely it is that people will leave without converting. But tags created in GTM load asynchronously by default, meaning each tag can fire anytime it’s ready to. If you need to control the order in which your tags are fired, there is tag sequencing and firing priority functionality to let you do that.
Can be used for AMP sites and mobile apps, as well
You’re not even limited to just using GTM with standard websites. GTM can also be used to manage tags for AMP sites and mobile apps. In the case of mobile apps, GTM can be a huge help since it lets you add and edit your tags without having to issue an updated version of your app, which users might not be quick to actually download. In some respects, using GTM for AMP sites or mobile apps is pretty similar to using it for a regular website, but they do have their differences. In this guide, we’re going to focus on using GTM for web.
Components of tags & GTM
On the surface, tags and tag managers are pretty straightforward. But before you can start working with them, there are a few main concepts you’ll need to know about.
When you start working with GTM, the first thing you’ll need to do is create a container. A container essentially “holds” all the tags for your site.
After creating a new container, GTM gives you some code to add to your site. This is your container code and it will need to be added to the source code so it displays on each page of your site. Some CMSes, such as WordPress, have plugins to help add the container code for you, but you may need to contact your web developer to have it added. Once you’ve done that, you’ll be able to add, edit, disable, or remove your tags as needed through GTM.
Each tag on a site needs to serve a specific purpose. Maybe you want to have a tag send information when someone downloads a file, when an outbound link is clicked, or when a form is submitted. These sorts of events are known as triggers and all tags need to have at least one trigger assigned to it; otherwise, it’s not going to do anything.
Triggers can be broken down into two main components: events and filters. When you go to configure a trigger in GTM, you’ll be given a long list of types of triggers to choose from. These are your events. Once you choose an event, you’ll be able to set up your filter.
Filters can be divided further down into three parts: variables, operators, and values. We’ll talk more about variables in just a minute, but in this case, it refers to the type of variable involved. The operator tells the tag whether an event needs to equal (or if it should be greater or less than a certain value, contain a certain value, etc.) And of course, the value is the condition which needs to be met. Even though the word “value” is typically used in reference to numbers and prices, remember that in this case, it doesn’t necessarily have to be a numerical value. In many cases, your value will be something like a URL or a keyword.
For example, let’s say I wanted to see how many people were reading the blog content on my site in depth. I could create a tag with a Scroll Depth event trigger that should fire when the vertical scroll depth reaches 75%. If I wanted this to fire on every page of my site, I could leave the “All Pages” option selected in the trigger configuration box and I wouldn’t have to create any further filters. But since I’m focusing on blog content, I’d choose “Some Pages” and create the filter “Page URL” “Contains” “fakewebsitename.com/blog.”
There might also be some circumstances when you don’t want a tag to fire. In this case, you can create a blocking trigger to prevent it from firing on those occasions. GTM prioritizes blocking triggers over other types of triggers, so if you have a blocking trigger that contradicts a condition set by another trigger, Google Tag Manager will follow what’s specified by the blocking trigger. For instance, if you have a tag that’s set to fire on all of your pages, but there are a few pages you’d like to have excluded from that, you can just use a blocking trigger to prevent it from firing on those few pages.
Variables & constants
While tags depend on triggers, triggers depend on variables. Variables contain the value a trigger needs to evaluate to know whether or not it should fire. The tag compares the value of the variable to the value defined in the trigger and if the variable meets the conditions of the trigger, the tag will fire.
Tags also use variables to collect information that can be passed onto the data layer as a user interacts with the site. A common example of this would be if a tag was set to fire when a person adds a certain amount of products to their shopping cart.
Variables can often be reused between tags. One of the most popular tips for using GTM is to create constant variables with the ID numbers or tracking codes you’ll need to use more than once. For example, if you’ll need to use your Google Analytics property ID number in multiple tags, you could just create a constant string variable with the value being your ID number. That way, instead of repeatedly having to look up and enter your ID number, you could just select the variable name.
When using GTM, you’ll be working with two different types of variables: built-in variables and user-defined variables. Built-in variables are some of the most commonly used types of variables, so Google went ahead and made them easy to access in GTM.
Once you select a built-in variable, you’ll be able to configure its settings however you’d like. Note that these are just a few of the built-in variables for regular web containers. You can find more built-in variables by clicking the “Configure” button. If you’re using GTM for AMP sites or mobile apps, you may see different options to choose from.
If you need another type of variable that’s not included as a built-in variable, you can create a user-defined variable. When you go to add a user-defined variable, you’ll be given a list of types of variables to choose from. For more information on each type of variables, Simo Ahava has a very helpful guide to different variable types.
Variables can be created from the GTM dashboard by clicking on the “Variable” option on the left side menu. You can also create them while you’re creating a tag by clicking on the button next to the field that looks like a Lego block with a plus sign on it.
Tags need information to know whether or not they should fire, but how (or where) do they get that information? One way they could find it is by checking the page’s HTML structure, but that’s really not an ideal solution. When tags need to search through…