Getting Started with Google Tag Manager

Google Tag Manager is an efficient and flexible tracking tool that allows you to track the important measuring points on your website. It enables you to track things such as registrations, divisions, purchases and much more.

Google Tag Manager allows you to collect precise data on your visitors' behaviour on your site so that you can act on them. Implementation and updating of 'tags' make it easier to work with a structured KPI setup and Google Analytics lets you have an overview of power measurement.

Options with Tag Manager

Google Tag Manager is an uncluttered control panel that makes it possible for everyone to work with even without coding skills. It is a crucial resource that is used to build better campaigns and increase your exposure to generate value for your business. 

More specifically, Google Tag Manager gives you the following options:

  • Track scrolls on the page
  • Track clicks on mailto links
  • Track clicks on pictures
  • Track clicks on gallery/slider
  • Measure the use of forms
  • Set Adwords for remarketing
  • Track clicks on outbound links
  • Track clicks on the social icons

Concepts in Google Tag Manager

Once you have become familiar with Google Tag Manager, there are a few new concepts that you should get to know.  Once you have mastered these, you are well on your way.

The most important are the following:

Google Tag Manager Container

The first time you create a Google Tag Manager account, you must create a container. The Google Tag Manager container holds all the tags for a website. You should then name the container for your site.

Once the container has been created, it creates a script that should be implemented in the code on your website. Container script should be placed on all pages of the site. Put the code after the opening body tag <body>.

Google Tag Manger container snippet:

Proper placement of Google Tag Manager container:

We recommend starting tracking in Google Tag Manager alongside the standard Google Analytics tracking. Create a separate Google Analytics property that should link to your Google Tag Manager container via the new Universal Analytics code.

With a parallel commissioning method for a brief period, you can build and update your tags in Google Tag Manager separately which ensures your tracking. Errors in setting up Google Tag Manager can be tested by removing the standard Google Analytics tracking script from the site.

Google Tag Manager tags

Once you have created a container and the script is implemented, you are ready to add and update the tags from the tag menu in Google Tag Manager account. Tags are recognisable names, for example. "Contact - Click on the mailto link." 

Google Tag Manager Triggers

Any tag in Google Tag Manager must be associated with a trigger. The trigger determines when a given tag is used and sends the data to your Google Analytics account.

Google Tag Manager Data Layers

Data Layers send information to Google Tag Manager. Each action (scrolls, clicks, etc.) is associated with several variables. When you set a trigger rule for your tags, it reads the information in the data layer and determines, based on the content in your data layer when a tag is activated. Once a tag is activated, the data is sent to Google Analytics. 

You can test the setup of your active tags with Error Correction Mode.

Google Tag Manager allows you to check the setup with a quick preview. By enabling preview mode, you can see a preview of your Google Tag Manager container directly on the website (in an unpublished state). The summary shows which tags fire on the site and sends data to your Google Analytics profile and can show what is happening in real-time.

Basic setup of Google Tag Manager

After reading the above, you are now ready to start your account.

  1. Create a Google Tag Manager account.
  2. Get the Google Tag Manager Container script and add it to the website.
  3. Create a separate Google Analytics account to test and assign a universal analytics code to tag manager.
  4. Implementation of Data Layers.
  5. Create tags and triggers in Google Tag Manager control panel.
  6. Google Tag Manager Advanced (custom scripts).

We have already discussed steps 1-3, let’s continue with the rest.

Implementing the Google Tag Manager and Data Layer for E-commerce

If users of your website can carry out reservations or purchases, it is important to apply a data layer on your websites confirmation page so that the values can be passed to Google Analytics.

Google Tag Manager data layer needs to be placed in the Google Tag Manager container and after <body>.

Example of Data Layer for E-commerce

<! - GTM Data Layer -> 
data layer = [{ 
'transactionId': '1234', 
'transactionAffiliation': 'Acme Clothing' <! - here the store name is written, if there are sub-shops you must define them - -> 
'transaction total': 38.26, <! - total amount of purchase - numerical value to be written out with a decimal marker -> 
'transactionTax': 1.29    <! - VAT - numerical value to be written out with a decimal marker -> 
'transaction shipping': 5 <! - shipping costs -> 
'transaction products': [{ 
'sku': 'DD44'                    <! - is important to have unique stock keeping unit(SKU) for each product - > 
'name': 'T-Shirt' 
'category': 'Apparel',     <! - only if it is possible to define a category -> 
'price': 11.99,                  <! - numerical value to be written out with a decimal marker -> 
'quantity': 1 
}, { 
'sku': 'AA1243544'         <! - is important to have unique SKU for each product -> 
'name': 'Socks', 
'category' : 'Apparel',    <! - only if it is possible to define a category -> 
'price': 9.99,                    <! - numerical value to be written out as. in decimal marker -> 
'quantity': 2 
'event', 'complete transaction' 
</ script> 
<! - End Data Layer ->

Check the implementation of scripts with Google Tag Assistant

Often, you may need help from your programmer to implementation your Google Tag Manager scripts.  You can look directly into the source code but we recommend a more user-friendly tool, Google Tag Assistant with Google Chrome. It is free and can be used by anyone. Get Google Tag Assistant for Chrome.

Create tags and triggers in Google Tag Manager control panel

When the base implementation of the script is in place, then you can create the tags and firing rules in Google Tag Manager control panel.

The first tag you need to create is a Google Analytics tag that should fire on all pages of your website. At Novicell name we give a typical tag "Script - Universal Analytics." Then define a firing rule. It looks like this:

Create tag events with Google Tag Manager

Now you can create all the tags which will enable you to track your website's activity and associated KPIs for overall business goals.

To decide on the relevant tags to make you should start on the business micro and macro goals. Here you will be able to identify which metrics on your website are crucial and that you should set up tracking on. 

KPIs that impact the bottom line directly, e.g. sections which lead to a confirmation page that is associated with an exact value. However, there will often be several indirect measures that create value to the bottom line. Typical examples of these micro goals are mailto links, registrations for newsletters, video starts, etc.

Example of setting the tag on click mailto links

Here is an example of how to use Google Tag Manager to set a tag on the event click mailto links on the website. They are often placed in the footer of a contact page.

The standard name we use is ‘Contact - click mailto links’ when we create a new tag. Remember to keep to a set structure as it helps to give a good overview. An example is using the tag ‘Contact - Completed contact form.’ This enables you to find the exact result you’re looking for in analytics.

You should start by attaching the tag to Google Analytics and assign the appropriate analytics property code. Create a macro with the code so that you can insert the macro each time you create a tag. This means you don’t have to remember the code each time.

When configuring the tag the tracking type selected is Event and the well-known parameters Category, Action and Label are defined. Again, it is critical to track with a good structure. Here we have named the category ‘contact’ and the action ‘click the mailto link.’ Followed by the element being tracked. Under the label, we have inserted a macro that retrieves information from the data layer.

The power measurement of the tag can be viewed on Google Analytics in the Behaviour tab and under Events. 

Below is an example of the report from Google Analytics showing tagged pages in a given period. This is data that you can quickly read and decide where things need to be changed. 

It can be difficult at first to set up tags, but once you have done it a few times, we guarantee that you will learn it quickly. The alternative is to get help from an external company like ourselves that has experienced professionals who have been using Google Tag Manager for many years.

Google Tag Manager and custom scripts

It is also possible for you to add HTML scripts. Previously it required your programmer to insert another script on the site.

Below shows where to go in AdWords to use the retargeting tool.  To use it you should start by creating a new tag and naming it ‘Script - AdWords Remarketing Tag.’ Choose AdWords as the associated product and AdWords Remarketing as tag type. During the configuration of the tag, insert the conversion ID from your AdWords Remarketing (Google conversion_id). You'll find it under your AdWords account.

Set the Firing rule to "All Pages".

Test the setup of your AdWords Remarketing tag with error correction mode.

Getting started with Google Tag Manager

At Novicell, we always work in close collaboration with our clients. Therefore, we start any partnership with a talk about your most important KPIs (Key Performance Indicators). This is regardless of the task being performed. A shared knowledge of your goals gives an opportunity to solidify tracking setup, and with Google Tag Manager and Google Analytics, it is a solid basis for developing and growing the business.