What is Google Tag Manager?

Read this article if you want to learn about GTM or need a refresher. It explains tags, triggers, variables, containers, and more.

Christiaan Proper avatar
Written by Christiaan Proper
Updated over a week ago

Google Tag Manager is a tag management system (TMS) that allows you to quickly and easily update measurement codes and related code fragments collectively known as tags on your website (or mobile app). Once the small segment of Tag Manager code has been added to your website, you can safely and easily deploy analytics and measurement tag configurations from a web-based user interface.

When Tag Manager is installed, your website or app will communicate with the Tag Manager servers. You can then use Tag Manager's web-based user interface to set up tags, establish triggers that cause your tag to fire when certain events occur, and create variables that can be used to simplify and automate your tag configurations.

Tags

Tags are segments of code provided by analytics, marketing, and support vendors to help you integrate their products into your websites or mobile apps. With Google Tag Manager, you no longer need to add these tags directly to your projects. Instead, you configure and publish tags and how they fire from within the Tag Manager user interface.

Triggers

In Google Tag Manager, tags fire based on events, such as when a form is submitted or when a video is played. Triggers are used to listen for these events, and they govern when a tag is fired or blocked.

Variables

To a computer programmer, a variable is a symbol in code that can be used to represent a value that will change. A Tag Manager variable performs that same function. Tag Manager variables are used in both triggers and tags:

  • Variables in triggers are used to define filters that specify when a particular tag should fire.
    Example: Fire a pageview trigger when the url variable is “example.com/index.html”.

  • Variables in tags are used to capture dynamic values.

Example: Capture and apply the transaction value and products purchased to a conversion tag.

Container

A collection of tags, triggers, variables, and related configurations installed on a given website or mobile app is called a container. A Tag Manager container can replace all other manually-coded tags on a site or app, including tags from Google Ads, Google Analytics, Floodlight, and Datatrics.

Workspace

A Google Tag Manager workspace allows you to create multiple sets of changes for your container. Team members can work on changes in separate workspaces to independently develop their own tag configurations. This feature helps with version control by enabling you to revert changes to a previous workspace configuration, and helps prevent teammates from inadvertently publishing someone else's unfinished changes.

Every time you make changes to a container, you are making those changes in a workspace. Every container creates a default workspace.

Preview (and debug) mode

Google Tag Manager’s preview and debug mode allows you to browse a site on which your container code is implemented as if the current container draft was deployed, so that you can test a container configuration before it is published. Your previewed site is connected to Tag Assistant so that you can inspect which tags fired and in which order.

Tag Assistant

Sites with Tag Assistant debug mode enabled will display in a separate browser window so that you can inspect which Google tags have fired and in which order. Tag Assistant debug mode shows what data is being passed to the data layer, and what events triggered those data exchanges.

Ready to implement the Datatrics tracking script and e-commerce scripts in Google Tag Manager? Let's continue with this article.

Did this answer your question?