This is the second in a series of blog posts on Google Tag Manager. Read Part 1. What is a Container Tag? At iProspect, we have been using multiple vendors for container tags since 2010. This series focuses specifically on Google’s new Tag Manager, providing an overview of the tool, helpful tips, hints, and learnings.

Setting up Google Tag Manager: Account, Containers, Users

There are essentially three parts in managing every Google Tag Manager setup; Accounts, containers, and users.

The Structure and Relationship of a Google Tag Manager Account

Accounts are the top-most level of organisation. The majority of companies tend to have one Google Tag Manager account, or one per business unit. However, different accounts are useful for separating out large global units, e.g. the North American unit, and the EMEA unit.

Containers are used to separate out and organise your tagging setup. A container holds a set of information, either for a specific site, a collection of sites, or for a mobile app.

Users can be added at either account or container level, and different levels of access may be set.

Container setup and structure is the main way to segment your tags. Arguably, the simplest approach is to have one container per website. This approach works well if each site is different (in terms of goals and development) as it keeps the setup with Google Tag Manager simple.

If sites share the same URLs, KPIs, or development style (if they are built on one template), grouping them together in one container can save time, especially when setting up certain tags like Google Analytics events, custom variables, social interactions and roll up reporting. This is because, in these situations, setup can be done in one container and applied across all sites, instead of replicating the same setup in each container.

Containers are often separated out based on permissions. If only one group of people is allowed access to a certain site, then it will need to be in a separate container as there is no way to limit access to certain tags.

Containers

What are the Parts of the Container Tag?

Containers are divided into three main parts; Tags, Rules, and Macros.

Tags are the tracking codes that you wish to fire, Rules are when they fire and Macros are name-value pairs (this will be explained in more detail later).

Tags:

Add a tagThere are two options when choosing a new tag. A pre-setup tag can be created, or it is also possible to create a custom html or image tag. Pre-setup currently includes Adwords, DoubleClick, Google Analytics, Universal Analytics, Mediaplex, Turn, AdRoll, AdAdvisor, Bizo Insight, comScore, Media6Degrees, and ClickTale.

When setting up a tag, some information is needed from the tool or tag you are firing (e.g. Web Property ID, Advertiser ID, etc). For most tags there are optional settings that can be applied, e.g. for Google Analytics you can set the site speed sample range, or the domain name. It is best to read what they are in the < href=” https://support.google.com/tagmanager/”>support section</a> if it is unclear. If using the custom html option, the whole script (with <script>, </script> tags) should be placed in the box.

A rule is then needed for the tag to fire. The majority of tags will either use the ‘All Pages’ rule, or set to fire on a certain page. It is possible to also block a tag from firing in certain situations.

Rules:
add a ruleThere are three parts to a rule. First, there is the conditional element of the rule. In other words, what you want to use as the condition of firing, e.g. a URL, or a domain name. Second, there are different situations to fire that condition e.g. contains, starts with, or is greater than. The final part is what the condition actually is, e.g. the name of the URL. As stated above, the most common rules set are URL rules.

The different conditional elements are all ‘macros’. Any macro can be created and used as the conditional element of a rule.

Macros:

macroMacros are like little boxes that are filled with certain information, usually to either define when a rule fires, or populate information in a tag. Macros can read values on a page or can be used in conjunction with dataLayers. It’s difficult to describe them exactly, as they are a bespoke setup to each site. 90% of the time, the pre-defined macros will be used during setup, like URL, domain name, etc.

For example, a macro that is not pre-defined could be a site with different tabs  Different tabs significantly change the content of a page, but do not change the URL. To be able to track them with a virtual pageview in Google Analytics, a dataLayer could be setup to take the title of the tab and generate the name. A macro would then be setup in Google Tag Manager to fire a virtual pageview, populated with the title of the tab to fire when an individual clicks the tab button. This is more of an advanced implementation but it shows where macros can be useful.

For more information on macros, please visit the <a href” https://support.google.com/tagmanager/answer/2644341?hl=en-GB”> the macro support page</a>.

Naming Conventions:

It is important to think about naming conventions from the offset. Try to keep a consistent naming convention within tags, rules, and macros to ensure you can easily identify and search for parts of your implementation.

This will be discussed more in next month’s blog post, ‘How to organize a Google Tag Manager Implementation’.

Versions and Publishing:

Once setup or after adding a tag, a new version of the container will need to be created and published. This is done in the container draft overview on the right hand side, clicking create version and then publishing. Google Tag Manager have an inbuilt function to test tags before the container is published. To do this, ‘preview and debug’ mode must be setup. Go to the settings on the left hand site, and first check that the site’s domain that  is being tested is in the list of domains. Then, in the container draft overview choose the preview draft and click the ‘update, Preview, Debug’. *Please clarify the sentence in yellow above. It is unclear – done – see above.

Summary:

The Google Tag Manager interface can be a little difficult to navigate at first. However, once a number of tags have been set up it is easier to understand the differences between macros, rules, and tags. This blog post has explained the structure and layout of Google Tag Manager’s interface. The next blog will cover how to organise a Google Tag Manager Implementation.

Rachel Sweeney

Rachel Sweeney

Contributor


Rachel Sweeney is Digital Specialist, Web Analytics & Conversion Optimisation at iProspect.