In 2017, I was featured in the Journal of Brand Strategy. I discussed tracking with Google Tag Manager, and while a lot of has changed since then in digital marketing, many of these principles are still the same. 

Below is the full publication: 

Tracking website data with Google Tag Manager 

 

Received: 11th September, 2017 

JOSHUA SILVERBAUER  is co-founder and chief executive officer of Grue & Bleen LLC, a digital marketing agency that specialises in website  tagging for marketing purposes. He is a certified Google Analytics, Google Tag Manager and Google Adwords  Specialist and has worked with companies of all shapes and sizes to help them understand how to track their data  more efficiently. Throughout his five years as a digital marketing strategist, he saw a need to bridge the gap between  creatives, analysts and developers, understanding that using code as a marketing tool was the future for advertising.  Today, he uses his knowledge of website structure and code to create data segmentation that reveals audience  insights and improves user experience and decision making. 

Abstract 

Google Tag Manager has revolutionised the ability of marketers to track virtually anything on a website.  This software serves as a powerful data collection tool — but with so much available information, how  does a company decide what is worth tracking? What are the privacy implications of tracking such  information? And once users have this data, how do they interpret it? Using strategic data collection  techniques, marketers can build powerful analytics systems that provide rich insights into user activity,  engagement and customer success. 

Keywords 

digital advertising, website analytics, Google Analytics, Google Tag Manager, tagging, click tracking, DOM  manipulation, digital marketing, digital analytics 

INTRODUCTION 

In the early 1990s, to propose a concept for  a new advertising campaign that entailed  employees hiding beneath company billboards, tracking potential customers’ cars  from billboard to store, then following  those customers around to see which items they added to their carts would sound  insane. Jump forward 25 years, and that  is essentially the process of digital mar keting, with the added bonus of the customer leaving before buying and bringing  the billboard directly to their house to  start the marketing cycle again. Marketers  are encouraged to track a consumer from  entry point (ie a digital advertisement) to  exit point (ie a sale) and to also formulate  a clear picture of the exact path that got  them there to further optimise their digital funnel. This, in turn, gives business owners  more insight into their online stores, set ting them up for earning a greater return  on investment. With digital analytics, a  marketer can track almost anything on a  website; data curation, however, is unique  to the business and must therefore be analysed specifically through the lens of the  company gathering it. The need for data  control, segmentation and manipulation  has grown in importance as digital analytics has advanced into marketing strategy  for companies and business analysts. 

GOOGLE ANALYTICS: ROOM FOR  IMPROVEMENT 

Most companies have Google Analytics  (GA) installed on their site. By simply putting GA code on a site,  companies receive user insights such as the  most visited pages, time spent on the site,  bounce rate, and referrer and source information. Frustration grew among market ers as GA became the predominant digital  analytics platform, inciting several issues  that needed to be addressed: 

  1. While GA was valuable, there was no easy way to get additional (more  valuable) insights. Google built in the  ability to track further insights, such  as link click data; every link click that  a marketer wanted to track, however,  had to be manually inserted with  code. 
  2. Communication errors between marketers and developers to get these code  snippets inserted in the right way —  ensuring clean data was being sent into  GA — frequently occurred. 
  3. Beyond GA, hundreds of other soft ware suites were being introduced that  required code to be implemented on  the website. Organising all these snip pets of code was a ghastly task that  made large campaigns difficult to man age. 

These frustrations revealed the need for  an additional tool to act as a vessel to send  further insights into GA that would help  put control back into the marketers’ hands  in terms of data mining. The solution:  Version 1 of Google Tag Manager (GTM)  was introduced in October 2012.2 

GOOGLE TAG MANAGER: A SOLUTION  FOR MARKETERS 

As digital marketing grows, so does the  software that surrounds it. The number of  tags (scripts that send information to different software suites) that were needed  to have a sufficient digital marketing  setup grew to a point where putting the  hard code on the site was time consuming and disorganised. GTM, a software solution by Google, is a tag management system that replaces the need for hard-coded  tags on websites with easily manageable templates. 

One common misconception is that  GTM is the ‘latest version’ of GA. While GTM works incredibly efficiently with  GA, they are completely separate programs. GTM is not limited to creating GA  tags; it can also integrate with dozens of  other programs and even supports custom  code injections. One of the benefits GTM  offers is that it fires tags asynchronously,  causing all tags and scripts to load independently of one another. This allows a  significantly quicker page load and more  accurate data collection. 

GTM is made up of three main components that are nested in what is called  a container. These components are tags,  triggers and variables: 

  • Tags are the actual code snippets or  templates that complete an action or  send variable information when a trigger tells them to fire. 
  • Triggers tell tags when to send information or complete a specific action. Variables are pockets of code that exist  within a page to receive and store information used by tags. 

For example, if a marketer wanted  to understand how many users click on  affiliate links, he or she could set up a variable with the affiliate names or link  ID nested in it, a trigger that will fire  only when someone clicks the affiliate link, and a tag that will send the variable content to the analytics system. This will  allow the marketer to understand which  affiliate links are driving the most traffic  and to reward those that are driving the  most sales. 

GOOGLE ANALYTICS/GOOGLE TAG  MANAGER: OPTIMAL DATA TRACKING 
 

Off the bat, both of these programs are  impressively robust. GA has the capabilities to show marketers where most of  their traffic is coming from — an easy  reference for social media marketing and  search engine trends. GTM comes with  built-in tag templates that simplify the  implementation of GA and make setting  up demographic insights (which previously required a relatively customised setup) as easy as clicking a button. Beyond the built-in features, there are additional steps one can take to get the most out of  the GTM and GA implementation. The  following list of tips is intended to help  marketing planners at different stages of  their analytics and tag management implementation strategy. 

In GTM: 

  1. Enable All Important Variables: GTM  has a plethora of built-in templates and features. When GTM is first set up, the  program will have only a few built-in  variables enabled — mainly the page level variables that show which page a  visitor visits. This information is useful,  but it is similar to information already  provided by GA. Hidden within the  built-in variable configuration are  click data variables, form data variables,  site-error information and more. Users  can even create their own variables  to capture any information they want  to collect on a site. This makes GTM  incredibly powerful, giving it the ability  to collect any data from a user interaction and send it to any analytics system.  Digital analysts must first enable GTM  to collect this information, which is  why it is important to configure the  built-in variables and select all of the  click and form variables. 
  1. Set Up a Basic Click/Form Trigger: Websites are no longer just storage  rooms for information. Many com panies have a specific purpose for  their site, whether it is to sell some thing, contact someone or simply  learn more about a product. In mod ern web design, these goals go hand in  hand with call-to-action buttons and  form submissions. Measuring clicks on  these buttons is important to gauge  the effectiveness of the site. Setting up  a basic click/form trigger will enable  click and form events in the GTM  interface, allowing GTM users to easily  find click or form information stored  in variables and create more restrictive  triggers. 
  2. Set Up a GA Settings Variable: In 2017,  GTM enabled the creation of GA set tings variables. These variables are fully  set-up GA templates that can be used  over and over again in any GA tag.  They store all of the specific settings to  a Universal Analytics setup such as UA  ID, custom dimensions, demographic  preferences or e-commerce prefer ences. Since GTM makes GA events  much easier to implement, GA settings  will be used quite a bit. Setting up a  GA settings variable will drastically  speed up a user’s workflow. 
  3. Enable Advertising Features in the  Universal Analytics Tag: When setting  up a GA tag in GTM, one can easily  enable advertising features by clicking  a button in the GA settings variable.  This allows marketers to gain information about website visitor age, gender,  affinity and in-market categories. This  information assists overall marketing  audience insights and can aid in the  understanding of return on investment  (ROI) from different audiences, leading to higher-quality targeting methods. Note that a GA administrator must  also enable advertising features in their GA property data collection settings. 

In GA: 

  1. Use Goals: This is an extremely useful  feature of GA that allows marketers to  understand their ROI better by creating website goals that involve certain  page hits or events. If a company has a  large ‘Buy It Now’ button on its home  page that triggers a pop-up asking for  user information, a goal may be the  submission of the completed form or  the arrival at the destination (confirmation) page after a visitor fills out  the form. These types of goals can be  configured in GA. GTM can help send  information to GA that can be used for  goals. 
  1. Enable Remarketing Lists: Remarketing  is Google’s term for ads that follow a  user around the web on different affil iate websites after the user has viewed  certain content. These ads are shown to  audience groups that are segmented in  GA. This can be one of the most powerful forms of marketing, but unless  Google is instructed to do so, it will not  collect remarketing information. The  ability to enable remarketing lists can be  found in the admin portal of Universal  Analytics in the property column, under  the tracking info drop-down within the  data collection setting. 
  2. Create a Clean View: GA is broken  into three tiers: Account, Property and  View. The Account tier is usually the  company name or label. Nested within  the Account tier is the Property tier.  The Property tier is used as a specific  website or subdomain where GA is  intended to exist. Inside the Property  tier is the View tier, which allows additional filters, goals and custom layouts.  GA allows an admin to create multiple accounts, each of which can hold up to  50 properties, and, within each property, up to 25 views. Within views, an admin can filter internal traffic, website  bots, referrer spam and more. It is crucial to have both a clean view and an  unfiltered view, as raw data are important to understand, and clean data are  an important foundation for marketing  decisions. 
  1. Enable Site Search: For a company,  understanding what a visitor is look ing for on its website is essential in  determining the effectiveness of the  user experience, information layout,  and product and service demands. GA  makes it easy to track website search  queries to provide such an understand ing. On most websites, when a visitor  types into a search box and clicks go or enter, the user’s search gets populated  into what is called a ‘query string’.  These are represented in URLs by what  looks like ?s=pizza, with everything  after the equals sign representing the  typed search term. GA admins can  track site search by navigating to their  view settings in their GA admin portals, turning on site search tracking, and  entering in the letter or term that signifies the first part of the query string  (which in this case would be ‘s’). 

There are many different implementation tricks that can help optimise a marketer’s experience with GTM. One of the  most important to understand is the GTM  data layer. 

PAGE CODE RELATIONSHIPS, DOM SCRAPING AND THE DATA LAYER 
 

The data layer’ is a phrase that has both  excited and intimidated marketers since  the rollout of GTM. One of the reasons  GTM was introduced in the first place was  to make tagging easier and less code oriented for marketers, so why put so much  emphasis on such a code-heavy concept?  

 

Understanding the data layer is the key to  getting the most out of website tracking  with GTM. The data layer is a JavaScript array used  to send information and data to GTM,  which can be stored and sent to any analytics system the marketer is using. Every  GTM container setup includes a built-in  data layer that communicates to GTM  about the data on the page. A programmer  or marketer can add to that existing page  data by adding their own, additional data  into the data layer. Regardless of whether  the data come from the page itself or are  added by the marketer, this data are communicated to GTM and can be utilised as  a variable. High value customer —  communicated via data layer 

Every mouse movement, action, click or  scroll on a website has an event associated with it. The first three events GTM  communicates when a website page loads  are Page View, Document Object Mode  (DOM) Ready and Window Loaded.  These events signify that the page code is  ready for use and that certain tags (specifically page-level events) will fire during  these GTM events. Beyond these built-in  events, other customised events can  be used to pull out the associated data  (Figure 4). For instance, when a user clicks  on an ‘Add to Cart’ button, that event has  millions of data points associated with  

that click. Not only does that event have  all of the ‘Add to Cart’ button data, but  it also includes the entire page of data in  relationship to that button click. Suppose  the ‘Add to Cart’ button is installed on  every product page on a website; simply  having ‘“Add to Cart” was clicked’ may  not be enough of a data point for analysis. Marketers may want to understand  in association with what product ‘Add to  Cart’ was clicked. This information can  be found in the data layer as a pathway to  the product information from the ‘Add  to Cart’ button. This method is called  DOM scraping. 

Click details — DOM scraping —  GTM interface 

DOM scraping is a bit unstable, as web sites are constantly updated, and code on  the page may change. This means that  the relationship between two elements  may move on the page, and the pathways  between them may no longer be the same.  The solution is to utilise data layer pro gramming. By inputting custom data layer  events, a marketer can rest easy knowing  that no matter how often the page code  changes, the data layer events will still fire  because they are set up separately and do  not rely on the page code. These events  can be used as triggers and send custom  variable information such as product  name and price. This information can  then be utilised by a tag and sent on to GA or other third-party services. Having a  solid data layer implementation is essential  to getting the most out of GTM. 

YOU CAN SPY ON ME, BUT ONLY  A LITTLE
 

With the ease of collecting massive  amounts of digital data, the distinction  between what tracking is a violation of  privacy and what is fair game is somewhat  unclear. The term personally identifiable  information (PII) refers to any data that can potentially identify a specific individual. This data include names, e-mail  addresses, phone numbers, social security  numbers and so on. GA’s policy on PII  prohibits sending this information into  GA. As GTM makes tracking much easier,  one needs to carefully set up one’s tags in accordance with GA’s PII policy, as one’s GA account could be terminated if one is  caught sending PII into GA, even by mis take. 

GTM can capture a powerful amount  of personal data, and while Google prohibits the use of this data for marketing  purposes, other platforms (including  self-made analytics systems) do not. GTM  has the ability to send this data to any plat form the administrator chooses. This raises  

security, privacy and ethical concerns.  With so much data available, it is up to  the administrator to decide how ethically  compliant he or she intends to be with  it. Since digital tracking is incredibly new  and continues to evolve daily, laws have  not completely caught up yet. Law is a  traditionally slow process, while technology continues to pick up pace, and the  struggle between the two is of increasing  concern. Data privacy continues to be a  grey area when it comes to what is and  is not acceptable in the world of digital  marketing. 

CONCLUSION 
 

As website functionalities are improving,  analytics solutions continue to evolve  alongside them. Every website has a goal,  whether it is to provide information, services or a product. Understanding how  visitors are receiving that information and  whether they are following the intended  pathways, interacting with the right handles and levers, and completing the web site goals is central to an effective website. GTM, along with GA, provides a robust  solution for tracking a website experience.  The data collection possibilities are end less, and with strategic implementation the resulting insights on how people are utilising a website can revolutionise a marketing campaign. 

References 
(1) McGee, M. (2015) ‘As Google Analytics turn 10,  
we ask: How many websites use it?’ Marketing  
Land, 12th November, available at: http:// 
marketingland.com/as-google-analytics-turns -10-we-ask-how-many-websites-use-it-151892 (accessed 9th July, 2017). 
(2) Holmes, L. (2012) ‘Digital marketing made  (much) easier: Introducing Google Tag  
Manager’, Google Analytics Solutions, 1st October,  available at: https://analytics.googleblog 
.com/2012/10/google-tag-manager.html (accessed 9th July, 2017).