A Beginner’s Guide to Tackling Google Tag Manager in 2019


By: Ashlyr Russell


Since its launch in 2012, Google Tag Manager has become a powerful tool for managing tags efficiently and cost effectively. Now in 2019, there are amended and new features that makes it easier to operate.

If you are not familiar with Google Tag Manager, here is a beginner’s guide that will tell you everything you need to know about the interface, how to set it up, and how it can benefit your business right now.
  1. What is Google Tag Manager?
  2. How Does It Work?
  3. Benefits of GTM
  4. Google Tag Manager Vs. Google Analytics
  5. How To Set Up GTM
  6. Tag, Variables, Triggers Set Up

What is Google Tag Manager?

Google Tag Manager (GTM) is a tag management service that creates and embeds tags (think multiple providers embed codes) on webpages for you. You can create, customize, and manage multiple tags directly from the user friendly interface and it will automatically code and implement on the website of interest.

If you are new to digital marketing, then you’ll learn that tags are marketers’ best friends. Tags (at least in the Google context) are code snippets that track information regarding user interactions on websites and send data to an analytics server (for example,Google Analytics). Marketers utilize data from tags to gain insight on user behaviour and experience to improve and optimize marketing strategy and campaigns. Tags can track a variety of information ranging from how long a user has spent on a website to what products users placed in their carts.

Usually, tags are manually coded by web developers. However, the process can be inefficient and prove difficult to manage for multiple tags simultaneously. That’s where Google Tag Manager comes in.

The purpose of GTM is to make managing and implementing tags on websites easier and to transmit accurate data on user interactions to analytic servers. For marketers, it gives them complete control of how tags are used and fired (activated), suited to their needs without relying on a developer to make the changes to the website manually. It also makes it easier to manage multiple tags and accounts under one user interface. Tags can be customized based on where you want the information to be fired. With GTM you can implement Google Ads tags, Facebook pixel tags, Google Analytic tags, etc.

How Does It Work?

GTM uses a container composed of a JavaScript (and non- JavaScript) code that enable GTM tags to be activated. The container code is placed onto every page on the website. When a tag is created from the GTM user interface, it inserts Javascript and HTML code into the GTM container in real-time as the pages are loaded.

Benefits of GTM

Why invest your time into GTM? Like many other tag management services, GTM is designed to make marketers’ lives easier and it’s able to do this in numerous ways.
  • It’s free to use and quick to set up.
  • Marketers have more autonomy in adding, editing, and deploying tags onto websites.
  • Marketers can manage multiple accounts and tags under a single user interface.
  • There are numerous supported tags offered.
  • Reduces the dependency on developers to manually add codes on websites thereby reducing the burden for both developers and marketers.
  • Overall, it will increase page speed of the website.
Page speed is an important component of web page performance. Tags use JavaScript code snippets to track activity. When adding a new tag, it sends an HTTP request to third party servers. If you have multiple tags, it takes additional time to query for each request in addition to waiting for responses by the third party servers. As a result, the loading time is longer. In a study by Pingform, they analyzed the page speed performance of the top 50 news websites worldwide. They discovered that on average, these sites take 9.46 seconds to load with tags. However, when tags were disabled it took 2.69 seconds for sites to load. Tags therefore cause a significant jump in loading time. For more information on page speed and tags read this comprehensive article, “How Third Party Tags and Trackers Impact Web Performance”.

With GTM, all your tags will be under one code snippet and use one JavaScript code query to load all tags. This reduces the number of requests to third party servers and improves web page performance significantly.


Google Tag Manager Vs. Google Analytics

You may be wondering how Google Tag Manager is different from Google Analytics. Google Analytics (GA) also has its own tracking code snippet that is embedded on every page of a website and sends data to its server. The purpose of GA is to collect general data received and generate reports and statistics about user interactions. This includes page views, bounce rate, session duration, etc.

However, if you want to track specific actions on your website, Google Tag Manager provides for the implementation of multiple and different tags that track a variety of information. It is important to note that GTM does not replace GA, but it helps add GA embed codes and creates rules in which the codes fire.

How To Set Up GTM

Setting up GTM is quick and simple.
  1. Set up an account (If you have a Google Analytics account, you can skip this step and proceed to the next step)
  2. To set up an account, go to https://www.google.com/analytics/tag-manager and click the blue “Start for Free” button on the upper right corner. On the screen it will ask for your account information (account name, location, container information, etc.). Once you have completed filling in the information, click the blue “Create” button.

    If you have a Google Analytics account, you simply switch to the Tag Manager interface by clicking the “All Web Site Data” dropdown on your dashboard. At the top of the menu bar, hover over and click the diamond shape icon, this is Google Tag Manager. You will be redirected to the GTM user interface.

  3. Plug In GTM codes on websites
  4. Next, a set of codes and instructions will appear indicating where to copy and paste the codes onto your website. One code should be placed high in the of your page and the other after the opening of the tag. You will have to do this on every page on your site.

    You can also access the codes under the unique ID number for your GTM container. On the GTM dashboard you can find this number displayed on the menu bar. Once you click it, the codes will appear.
  5. You have now Set Up your GTM account and embedded the code on the website.
  6. Now it’s time to create your first tag.

    Another thing to note when adding the GTM code, you must remove the GA code from all pages on your site. Having both codes will result in the data recorded twice.

What are Tags, Variables, Triggers?

Before we begin, you must understand the three key components involved in creating and deploying tags.

Tags - tags are code snippets that are embedded on websites to fire after a specific user interaction and sends information to analytic servers.

Variables - Variables are specific values for triggers and tags that filter when they fire.
  • Built-in Variables: values that have been predefined by Google (ie. clicks)
  • User Defined Variables: custom defined values created by the user. This feature gives the opportunity for marketers to add tags to track specific elements of interest. Thereby, providing more high quality information on the user experience and behaviour.
Triggers - triggers are a set of conditions that controls when tags are fired.

Tag, Variables, Triggers Set Up

With GTM, you can create unlimited configurations of tags. Therefore it is important to have a proper naming convention so that you can easily identify a tag and its purpose. Google recommends this type of naming convention: tag type - name of app - detail. For example, if you name a tag: Google Analytics - CTA, there isn’t enough detail to define which type of CTA that the tag is tracking. Now if you name a tag: Google Analytics- CTA- Contact Us, you can easily identify what that tag is specifically tracked.
  1. On the Tag Manager dashboard, click “New Tag”. After you name the tag, choose the type of tag under “Tag Configurations”. There are dozens of tag types offered.
  2. If you choose Google Analytics, you will need to enter your Web Property ID found on your Google Analytics. For other 3rd party servers, you will also need to enter your account number or ID. Then you will need to decide on your Track Type.
  3. Next is to choose a trigger.
  4. Once you are satisfied with the rules you have defined for the tag, you can click the “Save” button followed by the “Submit” button. The tag won’t work if you miss this step.
  5. When you click “Submit”, you will be redirected to the “Submission Configuration” page where you can choose between “Publish and Create Version” or “Create Version”. The “Publish and Create Version” will create and embed the tag onto all the pages on your site via the GTM container. The “Create Version” will save the tag as a version (a snapshot of the tag at a particular time), until you are ready to publish it.
Variables are essential for defining tags and triggers. They also help save information that may be needed consistently. For example, having your Google Analytics Tracking ID saved as a variable will save the headache of searching for it when needed. To set up your Google Analytics Tracking ID as a variable (or any other variable), the steps are:
  1. Click the “Variables” tag on your dashboard. You will see 2 options: “Built- In Variables” and “User- Defined Variables”.
  2. Since we are setting up the Google Tracking ID variable, click “New” under User-Defined Variables.
  3. Image Source: Hubspot
  4. Name the variable “GA Tracking ID” and then click the “Variable Configuration” box.
  5. Here you will choose the variable type. Choose “Constant” so the ID won’t change with different tags.
  6. Enter your GA Tracking ID into the value section and click “Save”.
  7. Now to update a tag with a variable.
  8. Return to Tags on your dashboard and click the Google Analytics tag that you created earlier.
  9. Next to the Web Property ID box, click the “+” icon.
  10. A “Choose a variable” option will appear and you will see the “GA Tracking ID” option that you created. Select it.
  11. Click “Save”. Your tag is now updated. Although we used GA Tracking ID as an example, the same process applies to any tag you want to update and add a variable.
Image Source: Hubspot

Conclusion

In summary, Google Tag Manager is an awesome tool to have in your toolbox. It allows marketers to have complete control of managing multiple tags and embedding them onto websites under one user interface. Additionally, with GTM you can customize your tags to gain more insight on user interactions of interest and develop higher quality reports. It is a free interface to utilize, therefore you can experiment without any costs. After reading this guide, you should be well equipped with knowledge to get started and tracking actions of interest. Good luck!