• Home
  • Tools
    • PPC Signal
    • PPCexpo Keyword Planner
    • PPC Audit
    • ChartExpoTM PPC Charts
    • PPCexpo PPC Reports
    • Combinations Calculator
  • Pricing
  • Contact us
  • Resources
    • PPC Signal Dashboard
    • PPC Reports Templates
    • PPC Guide
    • Join Our Facebook Group
    • Charts
      • CSAT Score Survey Chart
      • Likert Scale Chart
      • Pareto Chart
      • Sankey Diagram
  • Blog
Categories
All Digital Marketing PPC SEO SMM Data Visualization
All Digital Marketing PPC SEO SMM Data Visualization

We use cookies

This website uses cookies to provide better user experience and user's session management.
By continuing visiting this website you consent the use of these cookies.

Ok
Home > Blog > Digital Marketing > SEO >

What is The Google Tag Manager? Learn Everything About GTM

Your business’ website is like a marketing Swiss Army knife. It needs to expand your online reach, convert leads into customers, retain those customers through strong relationships and the list goes on.

In short, it is the most important element in your digital marketing strategy.

what is the google tag manager

This importance isn’t just the role that your website plays, but also the data it collects. Data is critical for learning customer behaviors and a better understanding of how to approach your target audience. And, your website is a treasure trove of data and actionable insights just waiting for you to discover its riches.

The problem is that collecting this data can be tedious and difficult. You need to implement tags into your website’s coding to understand how customers behave on your pages and what marketing efforts are contributing to the conversions taking place on your site.

Historically, these tags have been difficult to implement correctly and require some knowledge of website coding and understanding of marketing concepts. Now, the Google Tag Manager alleviates these struggles and makes managing your website tags quick and easy. It is a vital tool for website owners and webmasters!

This article is dedicated to teaching you what is the Google Tag Manager (GTM) and how you can use it to improve your digital marketing efforts.

Part 1: Google Tag Manager Basics

Before you start exploring the options and settings inside the GTM tool, you first need to know the basics. What is Google Tag Manager? How can you use it? How do you set up your GTM account? This part will answer these basic questions and provide other useful overview information.

What Is The Google Tag Manager?

The Google Tag Manager (GTM) is a free tool that makes it easy to add, edit and remove marketing tags from your website or mobile app. A marketing tag is a snippet of code or tracking pixels that allow you to gain deeper insights into individual user behaviors on and off your website.

Google designed this manager tool as a one-stop-shop for all of your marketing tags. Plus, it allows you to install and modify tags without lifting up the hood of your website and messing around with its code directly. Not only does this make setting up marketing tags easy and more efficient, but it also eliminates the chance of human error.

What Is The Google Tag Manager Used For?

There are many different ways to use the Google Tag Manager tool because there are several tags that you can implement into your site. These various tags add information to your understanding of customers and their behaviors.

  • You need to know when your various marketing tactics are resulting in conversions, whether it is paid search ads, social media posts, guest blogs or otherwise. Any time you are referring traffic to your site, you want to know how successful the channel is for building conversions. The conversion tracking tags will help measure this for you with the GTM.
  • If your site has a substantial ecommerce platform, GTM can help you identify behaviors and paths that lead to purchases. Then, you can use what you’ve learned to focus on these factors and achieve more purchases.
  • By using GTM to add the Google Remarketing Tag to your website, you can create lists of past visitors and retarget those users with paid ads across the Internet, thereby encouraging them to return to your site again.
  • Do you use videos on your landing pages? GTM can help you track plays and other video interactions.
  • Form submissions are also important to track and measure. GTM can gather data on any and all forms on your website and compile the information into one location.
  • Inserting a GTM trigger tag at a download link will let you know which users are using your downloadable resources and tools.
  • Measure scroll depth on your blog posts and other long-form pages to know how far people are reading and gain deeper insight into dwell times and bounce rates.
  • Track multiple page views to better understand how users navigate your website and how you can align pages to lead to conversions.
  • Send insights and click data gathered with GTM to Google Analytics to obtain a more full view of what’s going on with your customers.

How Does The Google Tag Manager Work?

With all of the above uses, it is easy to wonder how the Google Tag Manager actually works. How is it able to achieve all of these different functions? The process is very simple.

  • As mentioned, your website is a massive information source. The tags created with GTM are designed to collect this data.
  • The data is sent to Google Analytics or another tool that is capable of analyzing the raw data and presenting easy-to-use reports.
  • You use these reports to make smarter decisions based on actionable evidence, which leads to better marketing performance.
  • When tags need to be adjusted, removed or added, GTM handles all of the JavaScript coding.

 

google tag manager example

With GTM, you rarely need to manually add code to your website. In some cases, you only need to add one snippet of code! This is the Tag Manager script. Once this is enabled, you can create all of your tags in the GTM interface. The Tag Manager doesn’t make errors and quickly verifies that codes are working properly, which saves a lot of headaches.

You can focus all of your time on important tasks and leave the tag coding to GTM!

Advantages Of Using Google Tag Manager

Before getting into the technical features of the Google Tag Manager, you should evaluate its benefits. Will using this tool add value to your business? Here are the advantages of using Google Tag Manager:

Efficient, Scalable Tag Implementation And Updates

The key benefit of using the Google Tag Manager is saving time when adding, removing and editing tags. Your future tag development needs will undoubtedly change. The GTM tool makes it easy to scale your tags to meet these future needs and quickly implement updates when new priorities come along.

Secure

You have control over who has access to your GTM account and you can revoke permissions at any time. Furthermore, there are several degrees of permissions that control what users are allowed to do with the GTM service, such as read-only, edit, publish, etc. If an outside user attempts to access from an unknown IP address or URL, Google will flag the suspicious account activity and notify you.

Workspaces And Environments Allow For Collaboration Between Teams

Google Tag Manager’s Workspaces and Environments features mean that changes can happen at multiple tiers and be rolled out slowly. With Workspaces, multiple team members can create and test a new configuration. Environments allow for changes to be released in tiers that align with your organizational workflow.

Restore Previous Versions To Reverse Changes And Avoid Errors

If you ever make the wrong change or want to reverse a tag update, GTM keeps every past version of your site and tags. This means that you can reverse a change with just a click. The debugging mode in GTM is perfect for testing any changes for errors before they are published to the live version.

Limited Programming Knowledge Required

GTM is designed so that there is limited coding or programming involved. You can create the majority of tags without any code writing. It’s a perfect tool for marketers or website owners that don’t have prior knowledge or expertise of scripting.

Built-In Tag Options

Google Tag Manager has an expansive list of built-in tags that are easily implemented into your site. These tags handle the common uses, like remarketing, Google Ads conversion tracking, Google Analytics and more.

Disadvantages of Using Google Tag Manager

Google Tag Manager does have some drawbacks that are worth knowing. By identifying the disadvantages, not only can you better evaluate the potential impact of using GTM in your organization, but you can also prepare to avoid these pitfalls.

  • Although you don’t need in-depth web development and coding but you still need to know about JavaScript, HTML, and DOM to get the initial Google Tag Manager code into your site’s framework.
  • If the GTM container code is entered incorrectly or is damaged, all of your tags will stop working.
  • There is no dedicated Google support team for the Tag Manager tool.
  • When tracking tags are incorrectly implemented, it can lead to bad, inaccurate data.
  • It’s possible that a customer’s ad-blocking software will stop your ability to track via GTM tags.
  • The use of multiple tags can reduce the speed of your site and may hurt the user experience.
  • You still need the help of a developer to use the higher-level features and configurations.

 

How To Set Up A Google Tag Manager Account

Google Tag Manager is free to use and setting up your account is simple.

1. Visit the Google Tag Manager Setup page

2. There will be a box to click and create an account.

google tag manager example

3. You’ll be asked to submit basic information, like your account name (the name of your company works fine), country, website URL, and more.

4. Once finished entering the account setup information, click the “Create” button.

google tag manager example

Your account is now created. However, your job isn’t done yet! You need to put the Tag Manager codes into the <head> of your website and another snippet of code into the <body>. These tags need to appear on every page of your website.

Google will immediately present you with these codes after your account is created. You may have to consult your website manager or developer for this step. Luckily, you won’t have to bother your web developer too often now that you are using GTM!

google tag manager example

If you aren’t ready to add the Google Tag Manager code to your site, it will be available in the GTM dashboard at any time.

Part 2: Navigating Google Tag Manager: Features, Options, And Settings You Need To Know

Once you successfully insert the Google Tag Manager codes on your site, you’ll be able to use the GTM dashboard. This is the root menu for all of the features, settings and other options available inside the tool. It can be a little overwhelming, but each item in the GTM is a potentially valuable tool for your business. In the next section, you’ll learn about each feature and how it can be used.

What Are Tags In Google Tag Manager?

Tags are the bread and butter of the GTM. You can find the available tags from the left menu of the dashboard. These snippets of code are used by analytics and marketing platforms to track behaviors and gain insight.

google tag manager example

GTM is designed to effortlessly add tags no matter what type or configuration. This includes tags from other Google products but also tags created by popular third-party programs outside of the Google family. Developers can even join the Tag Vendor Program to create scripts that function with their products.

This results in many unique tag types:

google tag manager example

Google Analytics: Universal Analytics – You can add the required tags for Google Analytics with this option. You can also make run-time changes without having to edit code directly or resubmit your app binary to Google.

Google Analytics: App + Web Configuration – A new tag feature that aims to combine data between website and apps to gain a more complete picture of analytics.

Google Analytics: App + Web Events – Events can be used with existing analytics tags to gain specific information about user actions, site errors and other occurrences.

Google Ads Conversion Tracking: What happens after a person clicks an ad that brings them to your website? Do they purchase? Sign up? The conversion tracking tag is designed to report behaviors after clicks and help you recognize when conversions take place.

Google Ads Remarketing: As mentioned, this tag is designed to track past site visitors with the intention of creating remarketing campaigns that help stimulate return visits and repeat business.

Floodlight Counter: This tag is used to count how many times a person visits your page after they’ve interacted with an ad. It can help you keep leads in sight and measure their interest.

Floodlight Sales: Similar to the Counter, this tag tracks how many items an individual user purchases and the value of those products or services.

Conversion Linker: The Linker Tag is placed on pages related to the desired conversion activity. This is designed to work with the Conversion Tracking Tag to ensure that every conversion is logged efficiently.

Google Optimize: The Google Optimize tag helps you measure performance against a specified goal. It is widely used to test landing page variants to see which one is best at converting traffic. However, it can be used for other optimization experiments as well.

Google Surveys Website Satisfaction: If you sign up for Google Surveys, you can use this tag to implement a code to your site that allows for easy tracking of website satisfaction.

Custom Image and HTML Tags: If you can’t find the tag you need, you can create custom tags within GTM. The Custom Image option will allow you to create and deploy a pixel tag, while the Custom HTML option lets you develop scripts that are not yet included in the GTM library.

What Are Triggers In Google Tag Manager?

When adding a tag, you’ll be asked for a trigger. This is the specific action or event that triggers the tag. For example, a conversion tracking tag may have the trigger set on a form submission button. The trigger waits for this button to be pressed and then knows to fire the conversion tracking tag,

google tag manager example

When you create a trigger, the default setting is that it will ping the tag every time that the event occurs. However, you can also add filters to your triggers to influence when they do and don’t go off.

google tag manager example

For example, you may want to only trigger conversion tags once for each unique visitor, instead of every time the same person completes the action.

Once you select to add a trigger type, you’ll have a drop-down menu with all of the various trigger actions and types.

google tag manager example

Page View: A simple trigger — when a page is viewed, the tag is fired. It is useful if you want to look at data for individual page impressions. You can also set a page view tag to track conversions by targeting a page that can only be reached through a conversion, such as a “Thank you for your purchase” screen.

Window Loaded: A trigger that is similar to page view, except that it waits to trigger until it sees that the page has been fully loaded, including images, scripts and other resources.

DOM Ready: This trigger fires the connected tag when the visitor’s browser fully loads the page in HTML and the Document Object Model (DOM) is completely read. This is similar to Page view and Window Loaded, but DOM Ready happens in the middle of these two events. Using all three can help you detect slow page loads or other problems relating to high bounce rates. For example, if the Page View and DOM Ready triggers both fire, but Window Loaded did not, then you know the person left the page before all elements on the page finished loading.

All Elements: Trigger the tag after any click on a page, whether a link, image, button, etc.

Just Links: Trigger only after a user clicks a link that uses the <a> element. This is handy for tracking user movements and how they link from one page on your site to the next.

Element Visibility: When a designated element on the page comes into view, this trigger fires. For instance, an image or link that requires the site visitor to scroll in order to reach.

Form Submission: This trigger waits for a form submission to be completed and then fires the tag.

Scroll Depth: Sets a trigger to fire after a user has scrolled to a certain point on the page.

YouTube Video: If you embed content from YouTube on your site and want to know if it is being utilized, this will trigger tags to fire after any interaction with the YouTube player.

History Change: If your site uses HTML 5 pushState API, then the History Change trigger can be used to track virtual pageviews within a browser application.

JavaScript Error: Track and log JavaScript errors that may otherwise go undetected. Error messages will be listed in your chosen analytics tool. You can make changes to correct JavaScript exceptions, such as window.onError.

Timer: The GTM Timer trigger fires after a user spends a certain amount of time on the page. It’s a valuable trigger tool to measure how long it takes someone to read a blog post or finish a conversion activity.

Trigger Group: The trigger group feature allows you to link more than one trigger together. The tag only fires if every trigger is met. If you add multiple instances of the same trigger, then it needs to fire the same number of times.

Custom event: You can create a custom event trigger in GTM to measure behaviors on your site that are not tracked with Google’s normal trigger types.

What Are Variables In Google Tag Manager?

Variables are values you set that impact both tags and triggers. A variable adds an additional condition that must be met. For instance, you can set a URL variable to specify a certain address snippet that must be hit before a page view trigger fires.

google tag manager example

Variables also affect tags by defining exactly what information and data is collected. For example, if you’re using the Floodlight Sales tag, you may use variables to designate that the tag collects product ID information and the total value of the transaction.

Built-In Variables Versus User-Defined Variables

GTM gives users the option to choose between a wide selection of built-in variables. The majority of your variable needs will be covered by this preset list of options. These variables are found in the “Built-In Variables” section of the “Variables” menu in the GTM interface.

google tag manager example

If you don’t find the variables to suit your data analysis needs, you can scroll down the page and find the “User-Defined Variables” section. These custom variables will allow you to create your own values, like a specific numerical input, a name string, or a particular URL component.

google tag manager example

When you click to add a “New” user-defined variable, you can choose between a number of variable types that you want to customize for your tags.

google tag manager example

HTTP Referrer: This variable looks at the URL of the previous page the person visited. You can use this variable to fire tags only when people come from a specific page. For example, if you want to track conversions that result from a specific landing page, you would use the URL of that landing page as the HTTP referrer.

URL: This variable looks at the URL components of the current page. The URL variable sees a lot of use because it can assess which query parameters or hash fragments are in the URL, which helps determine key data about an individual’s behaviors on your site.

1st Party Cookie: The variable uses the value of the 1st party cookie that corresponds with the domain name of the page that the user is on. If there are more than one cookies used in the same domain, this variable will choose the value of the first cookie. You can determine this value by the first result of the page’s document.cookie file.

Custom JavaScript: With this variable option, you can set the value based on the result of a JavaScript function. In this scenario, the JavaScript function must return a value. In the following example, a JavaScript function is used to turn a specific URL’s variables to lowercase:

Function 0 {

Return {{url}}.toLowerCase();

}

Data Layer: The variable value is determined by data being pushed to the data layer through the dataLayer.push() call: dataLayer.push({“Data Layer Name”: “Value”}).

JavaScript Variable: If you’ve specified a global value in your JavaScript, you can use this option to use the JavaScript variable as the chosen value. This is helpful if the required value is not available in the data layer or elsewhere.

Undefined Value: Use an undefined JavaScript value.

Auto-Event Variable: When a certain effect occurs, such as clicks, form submissions, element visibility and so on, the variable collects information specific to the event being triggered.

DOM Element: If an important value is not available in the data layer, but is present in the Document Object Model, this variable can be used to guarantee that the value is set based on the text of the DOM.

Element Visibility: Similar to the element visibility trigger, this value is based on a user seeing a specific component on the page. The difference is that the element visibility variable only reports the visibility of one page element. You can choose whether this element is chosen based on an ID or CSS Selector. If there are multiple elements that fit the CSS Selector’s criteria, the first option is chosen.

Constant: If you have multiple tags using the same value, the constant variable option allows you to manually provide a constant string to set the value yourself.

Custom Event: Use a custom event name as the value.

Environment Name: The value is set to the preview mode environment name.

Google Analytics Settings: If you are using the Google Analytics tag for Universal Analytics, Google will ask you to also use the Google Analytics Settings variable. This is used to ensure that various tags are configured using the same Google Analytics settings.

Container ID: The value is determined by the ID of the GTM container.

Container Version Number: When using preview mode, this variable option will return the value of the container’s preview version number. Outside of preview mode, it will use the container’s live version number.

Debug Mode: This variable returns a “true” value if the container is in preview or debug mode, otherwise it reads false.

What Are Folders In Google Tag Manager?

Folders are used for organizational purposes in the GTM tool. As you add more tags, triggers, variables and other options, it becomes difficult to keep track of everything. You want your tags to be organized into groupings that make sense and help you efficiently use your GTM account.

google tag manager example

Creating a new folder is very easy.

  1. Select the Folders option from the left-hand menu.
  2. Then, click “New Folder.’
  3. Once a folder is created, you can click the checkboxes next to tags, triggers and/or variables from the “Move” menu.
  4. You can also create new triggers, tags or variables right in a folder to have them automatically placed in this grouping.
  5. Be sure to name your folders with a specific title that helps you identify the contents.

 

What Are Templates In Google Tag Manager?

Templates are helpful for organizations where there may be multiple people using the same GTM account. This feature allows you to save your customized tags and variables so that others can access them for their own projects. Templates are permission-controlled to ensure privacy.

Plus, the sandbox environment of the custom templates feature allows for custom tags and variables to be developed in an efficient way, especially compared to custom HTML tags or JavaScript variables.

Tag Templates: As described above, tag templates allow you to create your own tag-variable combinations for others to use.

Variable Templates: Through the use of JavaScript framework and APIs, you can create variable templates that return custom values.

google tag manager example

Why Use GTM Templates? It’s all about efficiency and safety with regards to implementing marketing and measurement tags. You want your teams to be able to collaborate and use tags to achieve the best possible results. With GTM templates, you can ensure that there is some control over what’s being tagged and why.

When adding new tags, you can quickly refer to your existing templates to find the right tag and variable definitions that you need to deploy.

How To Create A Template In Google Tag Manager

To create a GTM template, select “Templates from the left menu. Then, click the “New” button in the right hand corner of the Templates menu.

google tag manager example
  1. First, fill out the “Info” section of your tag, which will ask that you supply a name, description and icon.
  2. Refresh to ensure that your template name, description and icon appear correctly.
  3. Click “Fields” and “Add Field.”
  4. For this example, select “Text Input and change the default name to “accountID.”
  5. (Optional) You can refresh again in the Template Preview to check your progress.
  6. Select the “Code” menu to enter a JavaScript editor mode.
  7. Once finished, you can “Run Code” to test your work. Any errors or problems will appear in the Console window.
  8. Save and close the template editor.

 

What Are Workspaces In Google Tag Manager?

Templates are not the only way that the Google Tag Manager helps teams collaborate and work together. Workspaces are another handy feature for businesses to use. Essentially, a workspace acts like a drawing board for your tag configurations. You can work on changes, develop new configurations or test potential triggers/variables.

google tag manager example

When you want to add the changes to your live tags, it becomes a new version. If you decide you liked the old configuration better or your new changes were not ready, you can quickly revert back to the old version. This makes it very stress-free to modify or add new tags to your website.

You can add a workspace by clicking the Workspace tab and then selecting the blue ‘+’ symbol in the menu.

google tag manager example

Add a name to your workspace. Again, the title should relate to the purpose of this workspace, especially if you have multiple teams using different workspaces to test their own changes.

google tag manager example

Best Practices For Google Tag Manager Workspaces

To ensure that you use your workspaces effectively and safely, here are a few tips to keep in mind. They will help you manage your workspace projects.

Small changes are best: Changes to your tags should be made little by little, instead of all at once. When you slowly trickle out changes, it is easier to detect where a potential problem occurs. For instance, if you update your tags with every small, incremental change, then you know as soon as a problem arises that the last change was the culprit. Conversely, if you release huge updates all at once, finding the source of an error can be painstaking.

Group related changes together: A new workspace should be created every time there is a group of related changes that will likely be published at the same time or in a particular order. Grouping changes together in different workspaces will keep you organized. If you need to revert back to an earlier version, it is much easier to do so when each change from the group is related to one another. For instance, changes affecting your Google Analytics tags won’t interfere with Floodlight tag changes and vice versa.

Manage your teams appropriately: You can also use different workspaces for each team member or department. This allows people to work on their own tag changes separate from one another and eliminates the risk of someone accidentally publishing another team member’s unfinished changes.

Adopt descriptive naming practices: The importance of proper naming and descriptions has been hinted at a few times in this guide. As you develop more workspaces, it is crucial that you give them a proper name and relevant description. You want to find the right workspace quickly. You also want to be able to identify where certain changes are originating from. You may want to change the names of your workspaces based on the latest live version.

Test configurations: Workspaces are invaluable when it comes to testing new configurations and simply playing around with the GTM features. If you don’t like what you’ve created or it doesn’t create the intended results, you can always scrap it and start new. Be sure that you and your team are running plenty of workspace tests before publishing any changes live.

What Is The Data Layer In Google Tag Manager?

A data layer is a valuable tool used in conjunction with the Google Tag Manager. A data layer is a common JavaScript object that is used to deliver data back and forth between your website and the GTM. Data layer information can be used to influence variables and set off triggers in your tags.

In other words, the data layer is an alternative method to pulling variables that are spread out across various page categories, transaction data and other disjointed containers. The data layer gathers this data and ensures that it is readily available for use.

How To Implement Data Layer In Google Tag Manager

Unless you plan to use custom data in your tag manager, enabling the data layer is very simple. As soon as you add the GTM tag into your website’s source code, Google Tag Manager automatically creates and initiates the data layer.

Data Layer Declaration Versus dataLayer.push

When your data layer is first created, it is basically an empty bucket. It only becomes useful when data and info begins to populate that layer. There are two ways that data can be added to the data layer:

  • Utilizing the dataLayer snippet in GTM
  • Adding data via the dataLayer.push

Data Layer Declaration: There is a Data Layer code snippet in the Google Tag Manager that can be added to your site above the GTM container. This code looks something like this:

<script>

dataLayer= [{

‘pageCategory’: ‘google-tag-manager-tips’  → This must be replaced by a real page category

}];

</script>

<!– Google Tag Manager →

…

<!– End Google Tag Manager →

This code will create a layer that will specifically hold the pageCategory data point. Then, you can use that pageCategory data in your management of tags. There are some limitations when working with the data layer declaration method.

dataLayer.push: Alternatively to the data layer declaration, you can use the dataLayer.push technique. This small snippet of code acts as a triggering device in Google Tag Manager.

Here is a scenario for a newsletter signup form. In this case, data layer declaration may not be able to accurately track form signups. Thus, you want to push a Data Layer event every time someone subscribes with their email address on your website.

The code is as follows:

window.dataLayer = window.dataLayer || [];

window.dataLayer.push ({

‘Event’: ‘new_subscriber’

});

After a person subscribes, their information is stored to the data layer, which can then be sent to Google Analytics or another third-party platform.

What Are Containers In Google Tag Manager?

All of the tags, triggers, variables and other configuration components that relate to a single website or app is collected into a container. This is similar to folders discussed earlier. However, folders are much smaller groups, whereas a container typically pertains to an entire website. In other words, you’ll likely have one container for an entire website and that container may have several folders helping to keep the work organized.

There are a few rules when structuring your containers, each with some exceptions.

One Container Per Website Or App: Most users manage a single website with one domain. This means that you only need one GTM container for all of your tags, triggers, etc. This is because your tagging needs are going to be consistent across the site and managed from one location, even if you have multiple people managing the site and GTM tool.

Multiple Websites Or Apps, Multiple Containers: If you are managing multiple websites and apps, using a separate container for each entity is a better approach. This is especially true if the websites or apps have very different objectives or are handled by separate teams. In example, if you have an athletic wear company that also makes a fitness-focused app, you would want multiple containers. One container would handle the website’s tagging management. You would also create separate containers for the Android and iOS versions of the mobile app.

Multiple Websites, One Container: There is one exception to the above rule, where you would only need one container for multiple websites. This can be acceptable if each site has very similar tagging needs and uses the same content management system, site template and platform. The sites are so closely related that you do not need separate containers.

What Are Environments In Google Tag Manager?

Environments are a GTM feature designed to help organizations test their changes in stages before publishing them to the live version. You can create multiple environments to align with the different stages of your site development.

For example, you may have a development environment and a quality assurance environment. The day-to-day development changes are handled in the Dev environment. The successful changes are passed to QA to make sure that changes follow organizational standards and policies. Then, they can be passed on to the live site version where users can experience the changes.

How To Setup Environments

Before you enter the following steps, be sure that you have clear definitions for each environment. If you don’t need a multi-tiered development flow, then you’re better off using workstations instead of environments.

If you’re certain that you need to create environments for your tag management, follow these steps:

  1. Click the “Admin” option on the primary GTM screen.
  2. Press “Environments,” under “Containers,” then click “New.”
  3. Click the “Create Environment” box.
  4. Enter a name for your environment. You can also add a description and destination URL, but these are optional.
  5. If you plan to use the environment exclusively for testing, then be sure to put a check next to “Enable Debugging by Default.”
  6. Click “Create” and then “Publish Now” to start the environment.

Next, you will need to install the container snippet on the environment’s corresponding server. For example, if you have a server dedicated to development, then your dev environment needs to be linked to this server via this snippet.

Once you’re finished, you should see the environments appear on your Versions list.

What Is Debug Mode In Google Tag Manager?

GTM features a Preview and Debug mode that allows users to browse their site with a debugger pane available. This allows you to closely inspect your tags and ensure they are firing in the proper order. You can enter the Debug mode by clicking “Preview” in the upper right corner of the GTM menu.

There are five features available in the Preview and Debug mode:

  1. Event Timeline: See all of the events happening in the data layer and the order that they happen.
  2. Tags: See a listing of each tag connected to an event and whether or not they fired.
  3. Variables: Similarly, you can see a list of variables impacting a specific event.
  4. Data Layer: See message objects as they are pushed to the data layer and how the data layer looks after the event is over.
  5. Errors: Check for error messages in your tags.

 

google tag manager example

What Is A Tracker Object In Google Tag Manager?

Google Analytics uses a tracker object data structure to make sure that interactions on the website are compiled into well-formed Google Analytics requests and hits, it has some serious implications for Google Tag Manager Implementations. Tracker objects (also known as “trackers”) are objects that can collect and store data and then send that data to Google Analytics.

How does it works?

When creating a new tracker, you must specify a tracking ID as well as a cookie domain, which specifies how cookies are stored. If a cookie does not exist for the specified domain, a client ID is generated and stored in the cookie, and the user is identified as new. If a cookie exists containing a client ID value, that client ID is set on the tracker, and the user is identified as returning. Upon creation, tracker objects also gather information about the current browsing context such as the page title and URL, and information about the device such as screen resolution, viewport size, and document encoding. When it’s time to send data to Google Analytics, all of the information currently stored on the tracker gets sent.

 

What Are GTM API?

The Google Tag Manager API provides access to Google Tag Manager configuration data for an authorized user. With this API you can manage:

  • Accounts
  • Containers
  • Workspaces
  • Tags
  • Triggers
  • Folders
  • Built-In Variables
  • Variables
  • Container Versions
  • Container Version Headers
  • User Permissions
  • Environments

What resources and methods are available through the API:

The fundamental concept in any API is the resource. A resource is an object with a type, associated data, relationships to other resources, and a set of methods that operate on it. It is similar to an object instance in an object-oriented programming language, with the important difference that only a few standard methods are defined for the resource (corresponding to the standard HTTP GET, POST, PUT and DELETE methods), while an object instance typically has many methods.

Resources can be grouped into collections. Each collection is homogeneous so that it contains only one type of resource, and unordered. Resources can also exist outside any collection. Collections can exist globally, at the top level of an API, but can also be contained inside a single resource. In the latter case, we refer to these collections as sub-collections. Sub-collections are usually used to express some kind of “contained in” relationship.

Part 3: Troubleshooting Common Problems With Google Tag Manager

There are many issues and roadblocks that can arise with implementing tags, triggers and variables with GTM. That’s why it is so crucial to test your changes and new configurations. Even if your tests are successful, future changes may interrupt certain tags and create malfunctions. While the tool makes it much easier to detect and manage these potential problems, it is still helpful to learn some of the most common issues that can occur.

Your Tag Is Firing Incorrectly

Sometimes a tag will start to fire when it is not supposed to. Or, it doesn’t fire when it is supposed to. These issues can lead to inaccuracies in your data that have the potential to lead you towards incorrect conclusions. In most cases, this occurs because there are more than one triggers or rules at play.

Look at all of your trigger settings. You may have added different triggers to the same group or added additional settings that are overriding what you actually intended the trigger to do. Remember, when you use different trigger conditions, they all need to be met before the tag will run.

Your Tag Is Not Firing On Clicks

You have a click trigger enabled on your tag, but it isn’t firing when an individual clicks the targeted element on the page. This is a very common issue and typically can be resolved by looking at the specific element IDs or attributes that are targeted.

What happens is that when you have more than one element on top of each other, your tag may only fire when clicks occur on one element and not the other. For example, you may have a link within a button element. Thus, the tag may only fire when clicks occur on the link and not the button itself.

Your Data Layer Variables Are Incorrect

If you have specified variables in your data layer that are not properly firing on page loads, or an event in the data layer is not hitting the designated trigger, this can also create a problem that needs to be resolved.

Your first step is to make sure that your data layer is properly enabled. It may seem like a no brainer, but just double-check. Specifically, check that the data layer tag is populated before the GTM container loads. Otherwise, your data layer variables will not be available. You can check this in the debug mode in GTM by looking at the data layer during a page view event.

Your Latest Changes Are Not Visible

Every time you make a change in your GTM account that affects your website code, you need to check your work. Sometimes, you may find that the changes you’ve made do not appear right away. This can be a common and silly mistake where you finalized your changes but didn’t publish them and update the live version of your tags.

While it is rare that this happens when you’re working with GTM by yourself, it can occur frequently when you have a team of people using the tool. Someone else may unknowingly revert to a previous version without realizing that it interrupts the changes you’ve just made. It is good to have a log that tracks what changes are live and who is making updates.

Your Tags Are Not Registering In Google Analytics

This is easy to spot; your tags are firing and registering in GTM, but they are not showing up in your Google Analytics reports. It’s also fairly easy to fix. Take a look at your Google Analytics Property ID. It looks something like UA-XXXXX-X.

Whenever you enter a new Google Analytics tag, this ID must be present. It is possible that you’ve neglected to enter this variable or the wrong ID has been submitted. Review the Property IDs in any Google Analytics tags that you are having problems with.

For the future, you may want to create a custom variable with your Google Analytics Property ID, which will save you the trouble of entering this variable manually each time.

google tag manager example

Avoiding Issues With Debugging Tools And Google Analytics Real-Time Reports

One of the best strategies for resolving possible issues in Google Tag Manager is to create steps to avoid them in the first place. Using external debugging tools and monitoring Real-Time reports in Google Analytics are two great strategies for mitigating the risk of issues cropping up in your tags.

With Real-Time reports, you can instantly find out if your Google Analytics tags are firing properly. Sometimes, GTM sends data to the wrong ID. Real-Time reporting will allow you to see up-to-the-second GTM tag statuses and have an absolute guarantee that your tags are implemented correctly.

Helpful debugging tools, like the Tag Assistant chrome extension and Google Analytics debugger, will make your life and GTM management tasks much easier. Tag Assistant is great when installing Google-related tags (GTM, Google Analytics, Google Ads Conversion Tracking, etc.).

With the Google Analytics debugger, you can see all data that is traveling from your tags to the analytics tool. This allows you to find areas that need improvement and troubleshoot problems much more efficiently.

 

Frequently Asked Questions About Google Tag Manager

Some errors and problems regarding Google Tag Manager are due to a lack of information or, even worse, the result of misinformation. To help remedy some of this confusion, here is a list of frequently asked questions about GTM.

What’s The Difference Between Google Tag Manager And Google Analytics? Do you need both?

Many website owners and marketers are confused about the relationship between Google Tag Manager and Google Analytics. GTM helps you place Google analytics tags more easily and with fewer errors. In this respect, GTM acts as a middle-man between your website and Google Analytics. Both tools can exist without the other. That said, Google Analytics adds value to GTM and vice versa.

Who Should Use Google Tag Manager?

Digital marketers, web analysts, SEOs, PPC marketers, ecommerce business owners and many other types of professionals can benefit from adding, removing, and editing tracking scripts on their websites (or the sites of their clients). Thus, all of these individuals can also benefit from using Google Tag Manager.

Does Google Tag Manager Only Work With Google Solutions?

As mentioned, Google Tag Manager shares a close relationship with Google Analytics, Google Ads and other platforms in the Google family.  However, it can also be used with other tools outside of the Google brand. There are even tag templates available for popular third-party tools and companies can develop their own tags to work with their products and services.

Is Google Tag Manager Free?

Yes. Google Tag Manager is free to use, especially for small-to-medium sized businesses. There is also a premium version that may be necessary for larger companies with multiple websites and apps to tag.

Are There Other Solutions Like Google Tag Manager?

Yes. There are many tools and solutions available that offer similar services to GTM. Matomo, Adobe’s Dynamic Tag Management, Tealium, and Ensighten are just a few of the alternatives out there.

Do You Need A Web Developer If You Are Using Google Tag Manager?

If you don’t have access to your website files and don’t have understanding to alter them then most likely you will need a developer. Google Tag Manager does a great job of helping website owners add tags to their pages without having to open up their website and get involved with technical coding. However, you will still need your web developer, especially if you are creating complicated tag-trigger-variable configurations.

My CMS Does Not Allow Codes In The <head>, What Then?

While the tool will work best if the GTM script code is in the heading, it isn’t absolutely necessary. The higher in the code you put this script, the sooner it loads, which improves the accuracy of your tracking. Placing it in the <body> is fine, as long as there is not a <noscript> code in your heading.

Is Google Tag Manager Just For Websites?

No! You can use GTM to configure tags for Android and iOS mobile apps, as well as AMPs.

Can The Same Analytics Account Be Included In Several GTM Containers?

Yes. This commonly occurs when a marketing agency is in charge of multiple client websites. They want to manage all of their clients from a single Google Analytics dashboard. Thus, they use the same ID for each client’s container.

Can Adblocks Prevent Google Tag Manager?

Yes, but it is rare that an adblocker is set up to stop GTM tags. If it is, then this same extension would have probably stopped hard-coded tracking tags as well.

 

Can A Website Break Because Of Google Tag Manager?

Yes, but it is highly unlikely. If you use GTM responsibly, then this won’t happen. But, if you use unknown scripts that you’ve found online or deploy custom scripts that aren’t created properly, you may damage some functionality on your site. It’s best to consult a developer first. The good news is that if you do cause harm to your website, you can always click back to a previous version and reverse the damage!

Is Google Tag Manager Used To Store Data About Visitors?

No. What Google Tag Manager does is send visitor data to third-party tools, which happens on the visitor’s browser and only with permission.

Wrap Up

Google Tag Manager is a powerful platform that will help you gather marketing analytics data more efficiently. You’ll take full advantage of the data goldmine that is your website! Not only will this help you further your understanding of what motivates your customers to act, but you’ll also be able to use insights gathered through marketing tags to increase site traffic and revenue!

And, it is free service, which means there is nothing but a little effort required to get started with tagging your site pages.

How much did you enjoy this article?

We will help your ad reach the right person, at the right time

PPC Signal

Your Data. Your Insights.

Actionable insights discovered for you. Now you can do more in less time.

PPCexpo Keyword Planner

Find the Perfect Keyword. Surprise Yourself.

PPCexpo Keyword Planner will help you align your keywords with the customers’ intent.

PPC Audit

Free Google Ads Audit Report.

Frequent audits will help you optimize your PPC campaign for success.

ChartExpo PPC Charts

Picture a Thousand Numbers. See the Big Picture.

Visualizations give you the ability to instantly grasp the insights hidden in your numbers.

PPCexpo PPC Reports

Simple and Easy PPC Reporting. For Everyone.

Experience the new revolution in reporting … click your way to insights, don’t scroll.

Combinations Calculator

Do the Math.

Calculate the number of combinations in your PPC campaign. It may surprise you.

Insightful pay-per-click tips and tricks, delivered to your inbox weekly.

CTR Survey

ppc signal ad
chartexpo ad
ppc audit ad
keyword planner ad
19254

Related articles

next previous
SEO7 min read

How to Find Focus Keywords Using Keyword Research Tool?

Discover everything there is to know about focus keywords. You also get to see easy ways of identifying the right focus keyword for your business.

SEO8 min read

Maximizing Your SEO Potential With The Best Keyword Suggestion Tool?

Identifying the right keywords for your business will be impossible without keyword suggestion tools. This guide shows you how to use these tools.

SEO10 min read

Maximize Your Online Presence with Keyword Opportunities

Transform your online presence with keyword opportunities. Learn how to maximize your online presence.

SEO7 min read

How to Find Keywords for Travel Niche?

The travel niche is a profitable one. But you need to perform some research on keywords for travel. This guide shows you how to do just that.

SEO8 min read

Beat the Competition With Best Long-Tail Keyword Finder

In this guide, you'd discover how to use a long-tail keyword finder to create a robust PPC keyword strategy for your business.

PPCexpo

  • Home
  • Tools
  • Pricing
  • Contact us
  • PPC Guide
  • Blog
  • Sitemap
  • © 2023 PPCexpo, all rights reserved.

Company

  • Contact us
  • Privacy policy
  • Security
  • Patent

Tools

  • PPC Signal
  • PPCexpo Keyword Planner
  • PPC Audit
  • ChartExpo™ PPC Charts
  • PPCexpo PPC Reports
  • Combinations Calculator

Quick Links

  • PPC Guide
  • PPC Signal Dashboard
  • PPC Reports Templates
  • ChartExpo™ for Google Sheets
  • ChartExpo™ for Microsoft Excel
  • PPCexpo Keyword Planner Google Chrome Extension

Charts

  • CSAT Score Survey Chart
  • Likert Scale Chart
  • Pareto Chart
  • Sankey Diagram

Category

  • PPC
  • SEM
  • SEO
  • SMM
  • Data Visualization
  • Others
Join our group

Benefits

  • Q&A on PPC advertising
  • Get expert advice
  • Great PPC discussions
  • Stay updated with PPC news
  • Quick support on tools
  • Discounts and special offers