24 Feb 2016
Google Tag Manager structure
Reading time: 4 mins.
|
Difficulty:

Google Tag Manager Structure

Account, container, tags, triggers and variables

Google Tag Manager is made up of 5 fundamental elements (accounts, containers, tags, triggers y variables), which relate to each other in the following way. Google Tag Manager Structure:

Google Tag Manager structure

 

Accounts, user permissions and  Tag Manager containers

One unique Google mail user/account can have access to different Tag Manager accounts, so we will try not to confuse one concept with another.

With one GTM account for a company should be enough; as the user permissions can be assigned very well on container level, maintaining each container independently if desired. For example, it is possible to define the Display for an account as No access for some containers and Full access for another…

google tag manager user permissions

 

But it is cleaner to work with one account for company-client, for sheer comfort, have everything separate and to avoid possible future complications.

One GTM account is normally made up of different containers. And the most common is that each container is for one web site or domain (although it could also happen that different domains or subdomains share the same container, for example for multi domain Google Analytics and subdomains traceability).

GTM Container: Tags, Triggers and Variables

A container is made up of Tags, Triggers and Variables that are interconnected.

Both variables and containers are necessary for the correct setup and operation of the tags and can be reused within the container. We will see what each of these three elements consists of.

Google Tag Manager Tags

Las etiquetas pueden crearse mediante plantillas o mediante la etiqueta HTML personalizada (que sirve para insertar cualquier código HTML o JavaScript que necesitemos en nuestra página).

First of all, we find that tags are code fragments (HTML, JavaScript,…) such as the Google Analytics tracking code, the display or search campaign conversion pixels, remarketing pixels, etc. These fragments (or tags) are those that we will begin to place in websites, remotely, using the Google Tags container (it’s for this reason, although we don’t like it very much for validation and SEO, the container must be an <iframe>).

The tags can be created by using templates or through personalised HTML tags (which can be used to insert whatever HTML code or JavaScrpt we need on our page).

Etiquetas de Google Tag Manager

Aside from inserting tracking codes they can have alternative uses. It all depends on our requirements and creativity 🙂

Google Tag Manager Triggers

In second place, we find the triggers that, to sum up, are the conditions that activate the tags in different parts of the web site or key events, where and when we decide.  Therefore, the tags fire (or not) when each activator complies with each one of them.

Google Tag Manager triggers, as they are based on events, make up the main advance that has been produced – in my opinion – in several years in the way of carrying out and tracking web analytics. Now, not only can we insert a code according to the confirmation or landing URL but we can also make calls on parts of codes (or better put, on tags) according to any of these kinds of events:

 

Eventos de Google Tag Manager

Google Tag Manager Variables

 

The third key element within the container are the Google Tag Manager Variables and they deserve a separate chapter. To sum up, they are like variables of any programming code in so far as they are used to store and calculate values (as much static as dynamic). They are fundamental because they make up the triggers and tags (and are required to make both). These can be more fully exploited with a higher level of programming knowledge, within the variables we can use JavaScript code.

On one hand, we have a series of predefined variables:

Variables predefinidas de Google Tag Manager

And on the other we can create variables of all these types:

Tipos de variables de Google Tag Manager

We advise that you start with at least these 4: constant variable, query table, data layer and personalised JavaScript.

Google Tag Manager Folders

Finally, for some time now, a new functionality is available in Google Tag Manager to organise our elements: folders. It may seem of little importance, but when our list of tags, triggers and variables grows and grows… it is fundamental to follow a logical order, whatever it is, but which best adapts to your business and specific container 😉

Carpetas de Google Tag Manager