Google Tag Manager Concepts - Tags, Containers, Macros and More...

In a previous post we talked about some of the benefits of working with Google Tag Manager.

In case you were left wondering what a container or a tag is or how you set up a tag for Google Analytics this post looks at some of the key concepts you need to be familiar with when working with Google Tag Manager.

To start off with let’s look at the structure of Google Tag Manager. This contains three main components - the Account, the Container and Tags.

The Account represents the highest level of organisation. Usually only one account is needed per company with tags for all your company’s websites managed within this account.

A Container contains all the tags for a specific site. To create a new container you first select the relevant account and click the ‘New Container’ button. You will need to add a container name, time zone and domain.

Once you have created a container you can start creating Tags. These are essentially snippets of JavaScript that send information to Google and that can fire when you want them to (according to rules - see below).

Google provides ‘templates’ for its own tags but also allows custom tags to be used. To create a tag select the relevant container (i.e. website) and click the ‘New tag’ button. This will take you to a page where you will have to choose the tag type. Google Analytics, Adwords and Remarketing tags can all be found here.

Rules are also introduced at this level. Rules attached to a tag control when the tag is fired. Each tag must have at least one rule in order to fire. Rules that prevent tags from firing will override a firing rule.

Macros are "name-value pairs for which the ‘name’ is populated during runtime". For example you could use a macro to run some custom Javascript to set the category of an event as part of your event tracking within Google Analytics. Google Tag Manager provides a set of predefined macros for each container you create – for example {{url}} relates to the URL of the current page.

Previous
Previous

Why website URL structure matters to Google Analytics

Next
Next

Google Analytics - Bot Filtering Option