The Objeqt Optimization Blog:

Actionable Posts to Help You Improve Your Conversion Rates

Whether you’re just getting started with conversion rate optimization or you’re an old pro, check out our library of how-to-posts, guides, and more. Click the topic you’re interested in now!

Turn Google Tag Manager’s Scroll Tracking Feature into a Powerful Visitor Insight Engine

Google Tag Manager Scroll Tracking

Published by

March 13, 2018

Virtually every website, ecommerce and otherwise, contains at least a few pages of content longer than a single screen — so visitors have to scroll down.

Chances are you’d like to see how far down the page your visitors actually scroll, especially if they’re browsing a product page or similar page that contains important information below the fold.

Until recently, the only way to do this in Google Analytics was to use Google Tag Manager and create completely new events, custom dimensions and triggers.

The non-Analytics method was to use mouse tracking tools like Crazy Egg, Hotjar, or Mouseflow to track how visitors behaved on your website (among other things, how far down they scrolled). And while all of these tools offer excellent and compellingly-visualized data, they’re not free.

The Google Tag Manager method was free — but it involved a huge amount of code to define events, variables, and triggers. If you weren’t familiar with JavaScript, you’d be forced to depend on pre-developed packages without many options to customize.

A few months ago, however, Google created a number of new triggers and event types. Among these: the ability to track visitor scrolling using tags.

How to set up a scroll tracking tag

First, create a new tag

In order to set up a scroll tracking tag in Google Tag Manager, click the “New tag” button.

Google Tag Manager Scroll Tracking - Tag Creation
Click the button in the red rectangle to create a new tag

A new dialog window will open, where you’ll need to select the type of tag you want to add. Since you want this tag to report data to Google Analytics, select one of the Analytics types.

It’s likely that you’re using Universal Analytics, the latest incarnation of the tracking code, which has been available for a few years.

Google Tag Manager Scroll Tracking - choose tag type
Tag types available in Google Tag Manager. Select “Universal Analytics” (in the red rectangle above).

Next, configure your tag

Once you select the correct tag type, you’ll need to configure it in the Tag Configuration dialog. Since you use Google Analytics, you need to provide your account’s UA identification number.

Simply select the Google Analytics configuration variable, which is configured specifically for the Google Tag Manager account.

As a “Track Type,” select “Page View,” since you want to track the actions of a visitor viewing pages on your website.

Google Tag Manager Scroll Tracking - Configuration Dialog
Tag Configuration dialog

This is all you need to do in the tag configuration screen! The only remaining step is to define a trigger for event to be sent to Google Analytics.

Then, configure your trigger

Google Tag Manager Scroll Tracking - Trigger Configuration
The trigger configuration window

When you click on the rectangular window at the bottom of the Tag Configuration screen, you’ll open the trigger configuration dialog screen. Here, you’ll be able to select a trigger type — this is the step which enables you to start tracking visitor scrolling.

If the “Scroll depth” trigger is not already listed among the available triggers, you’ll have to click the blue plus sign at the top right corner of the screen and find “Scroll depth” among the existing and predefined triggers.

Google Tag Manager Scroll Tracking - Available Triggers
The list of available triggers

To enable the scroll depth trigger, just click it. When you do this, Google Tag Manager will link it with the scrolling tag you’ve just created.

All that remains now is to configure the trigger in the way you want by clicking on the trigger.

How the trigger should look when you configure it properly
How the trigger should look when you configure it properly

Using the scroll depth trigger, you can track two types of scrolling — vertical and horizontal.

To track vertical scrolling, you’ll need to enable “Vertical Scroll Depths” by checking the checkbox next to it.

Enter thresholds you want to track
Enter thresholds you want to track

When you check the checkbox, you’ll see a field where you can enter the thresholds for the trigger to fire. Each threshold will fire a new event to your Google Analytics to report how far your visitor has scrolled.

You can use two types of depth metrics — percentages or pixels. Either way, just insert the numbers, and GTM will automatically take care of the rest.

Horizontal scrolling works the same way. However, you’re unlikely to need to enable horizontal scroll tracking. If your page requires visitors to scroll horizontally, then it’s already not very well optimized for all screen sizes.

When inserting percentages, try to identify the part of your webpage where the content ends. For example, many web pages contain a footer or a contact form or other elements that aren’t vital to the visitor’s understanding of the information on that page. Say your page content ends at 80% of the page length; there’s little point in tracking visitors beyond that point.

Using pixels as a metric is rare, because it’s tough to readily define thresholds when setting up this trigger. But if you know the pixel length of your page accurately, you can choose to use the pixel metric instead of percentage.

Finally, configure which pages your scroll depth tracking will track

In addition to configuring the trigger in other ways, you can limit the pages you’ll track.

For example, if you have a blog on your site, with posts that typically span multiple screens, you may want only to track those pages and leave out pages with only one screen (and thus no need for visitors to scroll).

To limit the pages on which Google Tag Manager will track scrolling, you can use the radio button at the bottom of the trigger configuration screen:

The trigger configuration dialog
Choose the pages you’d like to track using the radio buttons at the bottom of the Trigger Configuration dialog

If you select “All Pages,” the scroll depth tag will track scrolling on every page of your website. Selecting “Some Pages” will allow you to define what pages you want to track.

By limiting tracking only to the pages with content that spans more than one screen, you’ll lower your analytics load, reduce the number of events reported (Google Analytics starts sampling if a number of hits on one property exceeds 500,000 a month), and make it easier to make sense of all the data.

You can use either the name or part of the name of the page or path to it, or you can use RegEx and define which pages will be tracked.

When you configure everything in the way you want, you just need to name the tag, save it and preview it to make sure it works. Once you’re sure the tag is configured properly and it works, you can publish it to your property workspace.

Using scroll tracking in GA

When you’ve successfully set up tracking, you’ll receive new event reports in Google Analytics. You can find these in the Behavior subsection of Google Analytics.

A sample Google Analytics event report
A sample Google Analytics event report

As you can see when you open this report, the events are properly reported as Engagement and Interaction-category events.

The advantage of tracking scrolling as “events” is that you can use those events to establish goals, and mark interaction with your website — so when a visitor actually scrolls all the way to the bottom of the page and leaves, it won’t count as a bounce.

How to use scroll tracking as a goal

As with any other event, scroll depth tracking can be used as a goal for Google Analytics. By creating a goal based on scroll tracking, you can track how many visitors actually view the entire page.

As a form of conversion, scroll depth is useful if you maintain a blog and you expect and want visitors to read your posts (especially if you include some form of call to action at the bottom of each post).

Since this goal is not a destination goal, there is no way to create a funnel visualization. Nevertheless, you can still use multiple events for scroll depth tracking, with each tracking to a specific percentage depth. This way, it’s possible to create a funnel-like representation of visitor dropout on every specific page.

Scroll tracking can help you develop your content

It should be fairly obvious that the content which your users view to the end is your site’s most interesting content.

By observing top events with landing pages as a secondary dimension in Google Analytics, you can quickly determine which of your landing pages engage your visitors the most:

Report on top events, with “Landing Page” set as the secondary dimension
Report on top events, with “Landing Page” set as the secondary dimension

Sometimes a landing page will be popular in search, but in actuality, it may not be as successful in engaging your visitors. By tracking how deep your visitors scroll on a given landing page, you can determine what information those visitors want to see and adjust your content accordingly.

You can also determine which content is more engaging and performs better in terms of general visitor engagement, so you can provide more of it, restructure it, or rewrite it to contain more useful information.

For example, some blog posts might contain a paragraph or two that are particularly interesting to your customers, but most leave after reading it. In that case, you can try changing the structure and content of the post itself, or writing another one with more detailed information.

Scroll depth tracking also helps you discover if a landing page or any other page with a call to action contains potential distractions. If you notice that people leave the page after viewing it to a particular length, you can examine that part of the page for possible distractions.

And that’s not all. Scroll depth tracking can be used for many other things.

A few drawbacks of scroll tracking using GTM

The first drawback is that to accurately track scrolling, you’ll need to create multiple events. The total number will depend on the granularity of tracking you want to achieve.

Chances are that you’ll need to use at least 5 or 6 events, with triggers at every 15% or 20% of the page, to be able to accurately track scrolling.

The second drawback is the possibility that inserting events may result in an increase in “(not set)” values in your landing page reports. The problem of “(not set)” values can happen when the default session duration runs out, and then the user scrolls the page and triggers an event before the session has restarted.

The reason for this is that most people navigate the Internet and find content by running across interesting content on social media, opening it in a new tab, and then going on with their previous activities. They return to the original content later.

But if the session runs out in the meantime, Google Analytics will not be aware that the visitor has yet to view the content. When the visitor returns and starts to read, the first scroll event will send a hit to Google Analytics account and result in that hit being reported outside of a session.

The only way to reduce this issue is to increase your minimum session duration. While this may introduce a new set of problems, it will likely eliminate most of the “(not set)” values from your landing pages.

Aside from these minor drawbacks, tracking scrolling using Google Tag Manager and Google Analytics is incredibly beneficial. Since it doesn’t require technical proficiency if you already have a functional GTM account, you can implement it very quickly.

And while this scroll-tracking method will never replace the dedicated visualization tools mentioned earlier, it will enrich the data Google Analytics provides you, so you can reach new insights or confirm existing findings.

Published by

Edin is a Senior CRO Consultant. Edin is into Google Analytics and testing (any A/B testing tool really) and likes to write about it. You can follow Edin on Twitter.