GTM: Advanced Techniques for Insightful Tracking

Here, we look at some of the advanced features of Google Tag Manager and how they can give you deeper view of your website

Kira Hawker

We recently took a look at Google Tag Manager (GTM) and some of the basic tracking techniques on offer with this intuitive tool. Now, we will take a deeper look at GTM’s offerings from a more advanced perspective, and why a deeper knowledge of GTM can benefit your business.


Device overlap with user ID

Your website is viewed by many different people on a multitude of devices, so tracking user behaviour on just a desktop will never be very effective. Your user may view a product on a laptop but purchase it later on their mobile or tablet.

GTM allows you to track device overlap using user IDs, which must not be what Google’s deems to be Personally Identifiable Identification (PII) such as name, email addresses or postcodes. Your CRM can be helpful in providing a shared ID across multiple devices, without relying on passing personal information to Google Analytics. Google Analytics creates alphanumerical IDs for every user, or you could define your own IDs using data from your CRM.

Once you have defined this user ID, you need to tell GTM to collect these user IDs and assign them to specific users. You can either do this by collecting the ID from a cookie that you already have on-site, or you can create a dataLayer variable. Once you have configured these new settings in Google Analytics, you’re ready to start tracking across all devices.


Device overlap with GTM

Scroll depth and stickiness

This is a vital element to track for sites that contain reams of content. It is integral for these types of sites to see how far into a piece of content you user goes. Tracking scroll depth can inform you of how far down a page your user has gone, which therefore tells you if they are fully digesting your content.

With GTM, you can add scroll depth triggers without any knowledge of JavaScript, as it’s now one of their default functions. For example you could measure in 25% increments, or you could set your own parameters depending on your specific needs, and pass these through to GA as events.

We are always told that content is king in terms of engagement, but without analysing scroll depth it is difficult to understand whether the content is really being read. Some statistics state that up to 40% of readers stop reading halfway down a page; if you have the analytics to back this up, you can create content that keeps them going to the end – perhaps by adding an image, a video, or a quotation.

Cross-domain and sub-domain tracking

Many businesses utilise a number of sub-domains for different elements of their website. For example, you may have a standard, an additional and perhaps even Of course, you will want to track users navigating through these sub-domains in one user journey in order to understand motivating factors.

GTM offers the ‘allowLinker’ tag, which can be done by editing analytics page view tags. You can then add a list of your domains to the Cross-Domain Tracking section within that tag. After this, you can add the list to your GA Referral Exclusion List, then you’re ready to go. There are numerous benefits to cross- and sub-domain tracking, including helping you define a better user journey based on this valuable data.


Cross-domain and leveraging environments

Block internal traffic

It may sound obvious but ensuring your own team’s traffic is not included in the overall data you receive is pretty important. Internal traffic is not reflective of standard user behaviour and can affect metrics such as conversion rate and page views.

Internal traffic can apply to many groups, not just your in-house team. Your marketing agency, web developers, brand ambassadors, and even your family, are all likely to inflate data, making it hard to get a true view of your website’s performance. You can already filter our specific IPs with Google Analytics, but in an increasingly remote works, internal traffic could be coming from a variety of IPs.

With GTM, you can add a query string parameter that filters out this internal traffic by recognising all the devices your team members use. You will be able to provide them with a link which they must open on all their preferred devices, then apply a filter to your GA data to exclude internal traffic.

Collate clickstream data

Clickstream data is the recorded information about every single interaction a user has with your website. This data is collected when users complete a tracked action, however it is sent to Google Analytics and displayed in broad terms. If you want to take a more granular look at this clickstream data, you need to define the clicks that will be important to you.

You can track clicks using both a GTM tag and an HTML tag. The latter attaches click handles to the elements of your site you want to track, passing this collected data to a dataLayer. From the dataLayer, you can use GTM to fire custom events, including passing it on to GA to be included in reports.

Why is this valuable? Well, it will help you redefine priorities on your website. You may think that most clicks in a certain section come from one element, however the clickstream data could provide you with the alternative routes users take to engage with aspects of you site, and therefore your business.

For example, if you run an ecommerce store with 100 product pages, looking at individual click interactions won’t necessarily give you valuable data because the information is distributed so widely. However, collating all product page data into a single set can show that certain on-page features have more influence over your customer shopping journey than you might have thought.


Testing and QA

For a lot of enterprises, staging and production servers offer a chance to practice certain elements before they go live. If your website utilises different development workflows, you can outline every environment your developers use with a specific container tag attached to each one. This then allows you to push whichever container you are working on to the correct environment for testing.

This benefits your backend team greatly, as it means they can all work simultaneously without disrupting each other’s work and breaking existing tags. This means testing and quality assurance can be completed far quicker, allowing updates to your website to be made more conveniently, thereby saving time and money!

Google Tag Manager can be a minefield for the uninitiated, but your digital marketing agency should be using it in some form to dive deeper into reporting and analysis. Essentially, GTM is a way to circumvent various developmental issues, thereby reducing wasted time and enhancing your knowledge of your website at a deeper and more granular level.