fbpx

Google Tag Manager: Building a control center for your data in 2023

Google Tag Manager: Building a control center for your data in 2023

In 2023, Google Tag Manager (GTM) is probably the single most useful tool that your team can use to collect data and inform smart marketing decisions.

Understanding the benefits of GTM and how to properly utilize it can be a challenge, so we’ve put together this guide as a reference point.

After reading this post, you’ll know how to set up your own account and get the most out of it (or upskill with a Google Tag Manager course).

Solving analytics problems with tags

Tags are snippets of JavaScript code added to a webpage to collect data and information. They help you monitor website or app visitor activity so you can optimize your site based on behaviors.

Most websites need several tags in order to track different behaviors and user flows, like form submissions or page clicks. The more tags a website has, the more difficult it can be to manage. 

How Google Tag Manager works
GTM doesn’t store information or offer reports, it just collects the data. This is its biggest difference with Google Analytics, which allows you to analyze the data and look at reports.
(from our Google Tag Manager course)

Enter Google Tag Manager.

GTM is not the only tag management tool available, but it is the most accessible. It’s designed to work exclusively with Google Analytics, which is why we’re focusing on it. Here are a few others:

GTM helps marketers get the customer data they need without habitually relying on a developer as the middle person. Here’s how:

Stay organized

Without a tag manager, a developer will need to manually add tags to your site, and set unique rules for each instance. Once in place, they’ll have to manually monitor activity, troubleshoot issues, discard expired code when new code is added, avoid conflicts, and so on. 

This is time-consuming and costly. Tag management streamlines the entire process.

How Google Tag Manager works
With GTM, you can set up individual tags for all the platforms from which you want to extract information regarding certain events (for example, purchase events on Google Ads).
(from our Google Tag Manager course)

Tag managers minimize the amount of code you need to deploy across your website and allow you to house all code snippets in one central hub, keeping all of your tracking data neat and organized. And, it’s user-friendly—you don’t need to be a developer to make code implementations or changes.

Think of tag management as a managing editor that oversees your content marketing operation. You can collate your publishing schedule, assignments, tasks, and documents in one place, and even automate activities, but without someone monitoring the workflow, the system will likely crumble.  

So while you don’t need a developer to monitor a tag manager, you do need personnel to keep an eye on it. That said, don’t cut IT out completely. Complex tagging tasks may still need to be implemented via a rule-driven, graphical interface.

Keep technology costs down

Bugs and barriers are inevitable, but GTM makes implementation and debugging easier, faster, and as a result, cheaper. 

A faster launch means your team has more time to work on other tasks, maximizing valuable resources. GTM is also completely free, so your team doesn’t need to allocate any of their budget towards another marketing software.

Still, mistakes can and do happen. To keep costs down and avoid doubling back to fix user error, follow these best practices:

  • Define your goals and track what you actually need to measure, rather than casting a wide net to capture data you don’t need and won’t analyze
  • Avoid piling too many tags on every page, as that will slow page load down
  • Make sure to discard or disable unused tags, especially after running a test and deciding not to proceed past trial
  • Avoid deploying custom HTML tags that break existing code
  • Ensure you set up analytics alerts and consistently QA new implementations to detect buried issues
  • Retain publish rights to personnel who are familiar with the system, as giving account privileges to unqualified team members could jeopardize activity

Increase the value of your analytics

Google Tag Manager doesn’t have reporting capabilities. Rather, it sends the valuable information it collects to Google Analytics for analysis. 

How Google Tag Manager works
Setting up GTM
(from our Google Tag Manager course)

Google Analytics 4 provides great insights into which of your pages are performing well—but GTM helps you dive deeper.

Your basic analytics tool can find things like:

  • Real-time pageviews
  • Location and device information of site visitors
  • Traffic sources
  • Top landing pages/blog posts

But tags help you go deeper to discover things like:

  • How users navigate your site
  • Which pages generate the most conversions
  • Where website visitors are most likely to leave your site

How to set up Google Tag Manager (in 2023)

To get your Tag Manager account set up, follow these steps:

1. Start with your goals

Determine your tracking goals to decide which types of tags you need to create.

You can create tags for Google Ads remarketing, conversion tracking, monitoring form submissions or button clicks, and more. There are also third-party integrations that you can connect to track information from sites like Hotjar, Oktopost, or Pinterest.

Create a marketing tags strategy before heading over to Google Tag Manager and creating your account.

2. Set up an account

You create a Google Tag Manager account through your Google email, so choose an admin or owner of the GTM account first. After, you can share permissions with others on your team who need to access it.

Log in with your Google account, then click Create Account on the main dashboard to start setting up shop:

Google Tag Manager main dashboard

From here, you’ll need to name your account. Best practices dictate naming it after your business to keep your tag management straightforward. 

Next, set up your container. A container is where all of your tags will live, so you should name this after your site or URL. 

Choose the type of platform your site or app lives on before clicking Create. This could be the web, an iOS or Android mobile app, AMP use, or server use:

Google Tag Manager account setup

Your next step is to install the container snippet onto your website. This is a snippet of JavaScript that needs to live on every page in order for the tags to properly track activity.

There are two parts to this snippet: 

  • The first needs to live in the <head> section of your website
  • The second should be pasted in the <body> section

The main three labels that you’ll see in the sidebar of your GTM dashboard are tags, triggers, and variables:

Google Tag Manager dashboard (new account)
  • Tags are tracking codes that collect data from a website or app
  • Triggers set conditions that tell a tag when to fire
  • Variables define when triggers should tell tags to fire

3. Install the Google Analytics tag

Keep in mind that if you do this through GTM, you’ll need to delete any Google Analytics tracking information you’ve previously placed on your website or you’ll end up with duplicate data. Click Add a new tag on your dashboard to get started, like GA Pageviews:

Google Tag Manager tag configuration and triggering view

Next, configure your tag. Click the top box to see a long list of the 50+ tag types:

Google Tag Manager choose tag type

Click the:Google Analytics: GA4 Configuration option.

Under the Tracking Type dropdown that appears, click Page Views:

Google Tag Manager GA tag configuration

4. Set up the property variable

You have two options when setting up your variable. First, you can check Enable overriding settings in this tag and paste your UA Tracking ID:

Google Tag Manager GA UA page view track type

Or, you can create a custom variable. While this takes some more initial setup, it’ll make things easier for you in the long run because it keeps your UA Tracking ID stored, rather than needing to paste it in for every tag you create.

GTM offers two different types of variables: built-in variables or user-defined variables.

Built-in variables are automatically defined by GTM based on elements detected in the code snippet. They offer several common variable types, making it easy to create basic tags.

Click Configure to set up each of the variables you’ll need in the future. You can always come back to this and add more:

Google Tag Manager variable configuration

User-defined variables are custom, based on the values you set. So you can create a constant variable that stores your Google Analytics Tracking ID:

Google Tag Manager user-defined variabels

To do this, click New under the User-Defined Variables section. Then under variable types, scroll down until you find Google Analytics Settings:

Google Tag Manager choose variable type

Paste your Tracking ID into the field, then save:

Google Tag Manager GA variable configuration

Now, when you create your Google Analytics tag, you don’t have to check Enable overriding settings in this tag. Instead, simply open the dropdown and select your new variable:

Google Tag Manager enable overriding settings

5. Configure your trigger

The final step in deploying your first tag is choosing a trigger that will make the tag fire:

Google Tag Manager configure trigger

Click on the Triggering box and select All Pages from the available options:

Google Tag Manager trigger complete (all pages)

Then click save. To get your tracking officially started, click Submit on your workspace changes. You’ll likely have two: one new variable and one new tag:

Google Tag Manager with workspace changes

6. Set up cross-domain tracking

If your customer journey leads users to different domains, cross-domain tracking helps ensure your tracking code counts them as one, rather than inflating your data and counting them for each domain they land on. 

This isn’t necessary for subdomains; only if you have two entirely different domains that work together.

You can set up cross-domain tracking at the tag level by checking the Enable overriding settings in this tag and accessing More Settings > Cross Domain Tracking, but the best way to do this is in your Google Analytics ID variable.

Head to the Variables tab and open the variable you created with your GA Tracking ID. Click into the Variable Configuration box, then click More Settings > Cross Domain Tracking:

Google Tag Manager cross domain tracking settings

In the Auto Link Domains field, insert each of the domains (if there is more than one) separated by commas before clicking save.

7. Understand the data layer

The data layer is a JavaScript code snippet that stores data from your website before sending it to GTM. It acts as an additional layer between your site’s HTML, which is constantly changing, and your tags, triggers, and variables.

Having a data layer helps make your data collection process smoother. For most tags, you don’t need to do anything extra—the data layer is automatically initiated by the initial GTM code snippet you placed on your website.

However, if you want to collect custom data, like product data or transaction data for eCommerce tracking, you’ll need to set up a separate data layer.

To do this, you need to create a data layer variable. This will allow GTM to read additional values from your website and pass it through to your deployed tags.

Your development team will have to assist with creating and implementing data layer code snippets for each page you want to track additional information for. These must be done on a page-by-page basis, and the script will look like this example from Google’s developer tools.

In this instance, there are two data layer keys: page category and visitor type. Depending on what you need to track, you might have one or you could have several keys.

Once your developer has implemented this code on each relevant page, you’ll need to create a new data layer variable for each key. Head to the Variables tab, then click New to create a new user-defined variable. Select Data Layer Variable from the list of options:

Google Tag Manager choose variable type

In the Data Layer Variable Name field, you need to enter the key name the exact same way it was written in the code. So from the example above, you’d create two data layer variables. One would be written pageCategory and the other would be visitorType:

Google Tag Manager data layer variable

8. Plan for user management

You can add and remove users or user groups from your GTM depending on who needs access. Head over to the Admin tab, then click the User Management option:

Google Tag Manager user management option

You’ll get a bird’s eye view of all current users and their level of permissions. There are two options:

  • Admin: Can create and remove containers, as well as manage user permissions
  • User: Can view basic account information and access specified containers

You can also set user permissions at the container level, whether you want them to have no access to certain containers, view only, make edits, approve edits, or publish edits.

Take the time to add each member of your team and set their permissions based on how qualified they are to make changes and deploy new tags.

Using Google Tag Manager to track behavior effectively

Here are a few tips to help you use GTM effectively.

Make sure GTM’s base code is present on every page

You don’t want to implement a complex tracking campaign, then realize after the fact that your GTM base code isn’t present on some of your most important pages. This is why it’s key to ensure the code has been properly inserted into your site’s HTML.

There are a few ways that you can do this, but the most basic is simply to check your website’s page source.

Go to the page you want to check, right click, then select View Page Source. Search the page (using a quick CTRL+F/CMND+F command) for gtm.js to check for the base code:

Google Tag Manager source code

You can also click the Preview button on the top right corner of your GTM dashboard and type in your website URL to see if the correct container has been connected to your website:

Google Tag Manager (Assistant) preview mode

Anytime you create a new container, double-check that the code was properly implemented.

Track events

Google Tag Manager combined with Google Analytics is great for tracking events that happen on your site.

These events might be:

  • Form submissions
  • Button clicks
  • Sign-ups
  • Scrolls
  • Video views

To do this, you’ll create another Google Analytics: GA4 tag, but this time the Track Type will be Event.

You can create a number of different event tracking tags to analyze customer behavior, but don’t overwhelm yourself with data that doesn’t necessarily affect your bottom line.

Debug your tags

Monitor your tags so you know they’re working and that your data remains accurate. To do this, use the Preview and Debug Mode.

Similar to ensuring your base code is installed, click Preview and ensure that Include debug signal in the URL is checked. Insert your website’s URL and click Connect. A preview window will open with a badge in the bottom right corner:

Google Tag Manager live site debug

Go back to the Tag Assistant page to make sure everything is properly connected:

Google Tag Manager connection success

From here, you can check out each of the options to see if anything is broken:

Google Tag Manager summary

Create constant variables

We covered how to create a constant variable for your Google Analytics Tracking ID. But if you’re working on retargeting campaigns with digital ads, you likely have other pixels installed on your website.

You can also create constant variables for those pixels so you don’t have to locate the proper pixel each time you create a new tag, and instead can select it from the dropdown.

Head to Variables and create a new user-defined variable. Select Constant from the list and paste in your pixel ID into the Value field before saving.

Be sure to name your variables so that you can easily figure out which pixel you need to add to which tags.

Install extensions

There are a number of Google Chrome extensions for Google Tag Manager that can make your life easier:

Google Tag Manager constant variable configuration
  • Google Tag Assistant has its own extension that allows you to check for tags on your website as you navigate through it.
  • Tag Manager Injector is a useful extension for debugging and testing newly deployed tags.
  • DataLayer Inspector+ helps your team understand what is being pushed to the data layer and if there are any issues.

Create a tag naming process

Get with your team to create a process or format for naming all of your tags so that everyone understands what each tag is tracking. Put a document together that explains how these names were created so the team knows what each tag does at a glance.

For example, you can have the tag type followed by what it’s tracking followed by the specified trigger. Come up with abbreviations or shorthand that your team follows to stay organized.

The limitations of GTM

Google Tag Manager does have some technical limitations, most of which relate to quota and account limits.

These won’t be of concern for most small and medium businesses. Large enterprises and agencies, however, may find some of these limits restrictive.

Google Tag Manager limitations include:

Container (size) limits 

Each Google Tag Manager account is allowed a maximum of 500 containers. The maximum size of each container is 200KB.

The more tags, triggers, and variables you add to a container, the larger its file size. These restrictions put an upper limit on the amount of code you can add to a site using Tag Manager.

Account and workspace limits 

You’re allowed a maximum of 400 Tag Manager accounts under a single Google account. In most cases, this is plenty.

In the free version of Google Tag Manager, you can have up to three workspaces. The paid version, Google Tag Manager 360, offers unlimited workspaces.

General quota limits 

Tag Manager imposes a number of other limits on file sizes, code lengths, and API requests.

  • Max recipe (readymade containers) file size: 10MB.
  • Max length of Constant Variable: 1024 characters.
  • Max symbols/characters in a custom HTML tag: 102,400.
  • Max API requests: 10,000 per project, per day. Max 0.25 queries per second.

If you want to use GTM effectively, follow these 6 tips

Implement these six best practices when setting up Google Tag Manager to improve efficiency, reduce error, and take advantage of its full feature set.

Create a plan for your tracking  

Before adding tags for everything you could track, define your business goals, the metrics you’ll use to measure success, and the customer actions that influence those actions.

Take these three common business objectives:

Now, define the metrics you’ll use to measure them. For “grow revenue,” three examples are:

  • Monthly recurring revenue;
  • New revenue closed;
  • Average revenue per customer.

Lastly, map out the events that take place in order to influence those metrics. For example:

All of those events are trackable with a tag in Google Tag Manager. Follow this process to ensure the data you’re collecting and analyzing is relevant to business goals.

Always hit preview before publishing  

Before you publish a new tag or amendment, always use preview mode.

Tag Manager Preview Mode

Preview mode runs a test of all the tags on a page. This allows you to see:

  • Which tags did and didn’t fire;
  • Reasons why tags did or didn’t fire;
  • The variables that were available on the page;
  • How the data layer was changing while various interactions occurred.

If the tag you’ve just created doesn’t work (or it creates issues for existing code), you’ll have a chance to fix the issue before you go live with the change, avoiding any user experience issues.

Use variables and data layers  

Google Tag Manager Data Layer is a JavaScript code snippet that acts as an additional layer between your site’s HTML and your tags, triggers, and variables to make the data collection process smoother.

Default tags automatically initiate the data layer, but if you want to track customer events, you’ll need to manually create a data layer variable. 

For example, use the data layer when passing ecommerce transaction data to Google Analytics, or when default Google Tag Manager form triggers don’t catch form submissions.

This is an instance where you’ll need your development team for help. Ask them to create and add data layer code to each page you wish to capture additional information from.

Then, head to the Variables tab in Google Tag Manager, click New and then select Data Layer Variable.

Choosing Variable Type on Tag Manager

You’ll be asked to provide a Data Layer Variable Name. Enter the key name as written in the code by your developer.

Variable Configuration on Tag Manager

This is one of the more technical applications of Tag Manager. If you’re new to Google Tag Manager, stick to the default tags available, or have your developer confirm the changes you’ve made before going live.

Don’t go overboard with the amount of data you’re tracking 

Each tag you create adds more code to your website, slowing down page load speed.

Best practice is to use as few tags as you require. Don’t go overboard and track everything just because you can. Stick to the data you need to measure success as defined in your marketing strategy.

Be sure to delete unused tags when you no longer need them, such as when you’ve run a trial and decided not to proceed.

Use extensions to fully support your Google Tag Manager 

If you’re using Chrome, there are a number of plugin extensions available to help speed up your workflows:

  • Google Tag Assistant is an extension from google that lets you check for active tags as you browse your site.
  • dataLayer Inspector+ is helpful for understanding what information is being pushed to the data layer and for identifying any issues.
  • Da Vinci Tools helps you test and debug new tags.

Leverage workspaces for bigger teams 

If you have several team members working on tag deployment for the same website, use the workspaces feature in Tag Manager.

Workspaces allow multiple team members to work in the same container simultaneously, without overwriting the changes each other is making.

Once everyone is finished, changes made in all of the workspaces can be merged into one.

Conclusion

It’s time to take everything you’ve learned here and start tracking your own website activity and events. Start with the insights that mean the most to your business and go from there. To become an even greater Google Tag Manager expert, check out our online course.

Related Posts

Current article:

Google Tag Manager: Building a control center for your data in 2023

Categories