What Is Google Tag Manager and Why Use It? 

Google Tag Manager is an essential tool for any website owner. It makes tag management fast, efficient and easier to understand. This guide will help you to better understand the GTM functionalities, and why you should start using it.

 

1. What is GTM?

GTM (Google Tag Manager) is a free tool offered by Google which allows you to manage various tracking codes (marketing tags, analytics tags) and other code snippets on your website/web app/mobile app.

 

2. Why should I use GTM?

With Google Tag Manager, you can track various interactions and send captured data to 3rd party tools like Google Analytics, Google Adwords, etc. It makes code deployment faster since you don’t have to wait for devs to implement changes. Additionally, all tags/codes are accessible from one place and can be tested in a debug environment before publishing to the live audience.

 

3. Won’t it slow down my website?

Even asynchronous tags impact the website’s loading speed. However, the scope of that impact depends on various aspects. An empty GTM container will have a minimal impact on page speed. The biggest impact can come from tags that you add to that container. But every tag is different and the impact can vary. Therefore, the final result is “It depends”.

 

4. How can I reduce the impact of GTM tags on page speed?

Remove unnecessary (or irrelevant) items in your container. This can potentially improve page speed (although that isn’t always the case).

If possible, delay at least some of your tags. Instead of activating them on All Pages, move them to Window Loaded or even after that. There might be some page components that load only after other resources are ready (e.g. scripts). That moment will be postponed by GTM tags, which may result in some important website functionality start working later than it should.

Reduce the number of DOM manipulations. “Edit”, “remove” or “create item” are expensive operations, since they require additional browser resources.

Before adding any new tracking functionality, you should weigh the pros and cons, and then decide if it’s worth sacrificing some page loading speed for functionality which can result in a revenue increase etc.

 

5. Do I need a developer to implement GTM?

You can create a GTM container by yourself. You will receive instructions on how to implement container on the website (It should be installed in your website’s source code.)

Consult your developer or, if you have access, do it by yourself.

 

6. Do I need a developer to implement tags via GTM?

It depends on your goal. If you plan to just track regular Google Analytics page views, clicks, scroll tracking and other basic interactions, you’ll be able to handle it by yourself, but sometimes the developer’s help is still necessary.

When you need some server-side data (which is not accessible by Google Tag Manager), for example, user ID, user pricing plan, you’ll need to cooperate with the developer, who should pass that data to the Data Layer. From there, you will be able to fetch it and use it inside GTM.

 

7. I’m using CMS, can I implement GTM there?

If you’re using a popular content management system, there is a chance that there’s an existing Google Tag Manager plugin that makes the installation a bit easier and might give you some additional settings.

If your CMS doesn’t allow you to place codes in the <head> tag, you can place them anywhere on the website. The higher you put it in the website’s source code, the sooner it will load, therefore your web tracking will be more precise.

The most important thing is that you must not place the <noscript> code in the <head> of a website.

 

8. Should I move the hardcoded Google analytics snippets to GTM?

It’s recommended to move all hardcoded (added directly in the source code) GA snippets to GTM. In the future, it will give you better flexibility in managing those tags, without involving the developer.

 

9. Can I test my changes before publishing?

GTM offers Preview mode. It allows you to browse a site on which your GTM container code is implemented. Sites with preview mode enabled will display all new changes, and additionally a debugger console where you can inspect which tags are fired and in what order. All not published changes will be visible only for you.

 

10. Can GTM be used by multiple people, without interfering with each other's work?

Yes, GTM provides workspaces functionality. It allows you to create multiple workspaces which can be modified and published by many users, independently of the rest of the workspaces.

 

11. What is DataLayer?

It’s like a virtual layer of your website which contains various data points which can be used for tracking purposes. It stores and sends information from your site to Google Tag Manager

If you need some information about the user from the database, like user id etc, you can ask your developer to push those into dataLayer. Then you will be able to use these values as regular variables in GTM.

 

12. What interactions Can I track with GTM?

There’s a lot of things you can track with GTM as a default functionality:

  • Link and element (e.g. image) clicks

  • Page Loads

  • When a particular element appears on the screen

  • Form submissions

  • Scroll depth

  • Time (how long a visitor stayed on a page, not website)

  • History change (useful for Single Page Website Tracking)

 

13. Can I use GTM to track e-commerce events on my website?

Yes, but first, you need to have e-commerce data pushed to the data layer. Usually, this is done by the developer or a particular plugin.

Then you need to create a tag that will transfer that data from the Data Layer to Google Analytics.

Important: Google Analytics (and Google Tag Manager) documentation provides various examples of code snippets of how the data needs to be pushed to the Data Layer. You must follow that data structure precisely.

 

14. Can I track Events in the iFrame?

Yes, if you have access to the code within the iFrame (It’s impossible to track the iFrame without having access to it, because of security reasons).

 

15. Can I break the website with GTM?

That’s possible. Generally, it’s harder to break a page using built-in triggers and variables. Using poorly tested or unknown/suspicious scripts found online can break some functionality on your website. That’s why you should always consult with developers before deploying custom JavaScript.

 

16. Can Adblockers or other browser extensions block GTM?

Yes, they can. But this is not very common. Keep in mind that if an extension blocks GTM, it would have probably blocked hardcoded Google Analytics as well.

 

17. How can I improve GA tracking using GTM?

(https://www.simoahava.com/analytics/improve-data-collection-with-four-custom-dimensions/)

As described by Simo Ahava, it’s worth starting with the implementation of additional Custom Dimensions like Client ID, Session ID, Hit Timestamp and User ID. These will help you browse data more granularly. These data might be also used for deeper analysis performed in external environments like R + Shiny dashboards.

Previous
Previous

How to Use Surveys for Your Business and Why They are Important?