Scroll tracking allows you to measure how website users engage with your content. It also can change an unnecessarily high bounce rate to a meaningful and real bounce rate.
In this article, I will talk about how to set up scroll tracking in Google Analytics 4 (GA4).
Understanding scroll tracking in Google Analytics 4
Google Analytics 4 tracks scroll events by default through its enhanced measurement options.
With enhanced measurement in GA4, you can automatically track and measure interactions and content on your sites in addition to standard page views. Scrolls, outbound clicks, site search, video engagement, and file downloads are the events tracked automatically.
Caveat: By default, GA4 tracks only 90% of scroll events. But what about the other scroll depths, like 10%, 25%, 50%, and 75%?
These scroll depth events also play an important role in measuring user behavior on a website, especially if you have a heavy content website.
Another thing to note is that GA4 only tracks vertical scroll events with no parameter collected for the event. If you want to set up scroll events for lesser thresholds (10%, 25%, 50% and 75%) or horizontal scroll tracking, you need to set up custom events using the global site tag (gtag.js) or Google Tag Manager.
Let’s set up scroll tracking for your Google Analytics 4 property using Google Tag Manager using the below steps.
Setting up scroll tracking in Google Analytics 4 using Google Tag Manager
Note: You must have a GTM container code available on the website before proceeding through these steps.
The scroll depth threshold is a built-in variable in GTM, and it should be enabled to use in our events. If it’s not enabled by any chance, you can enable it by going to the ‘Variable’ tab.
Under ‘Built-in Variables’, click on ‘Configure’.
Click on every checkbox under ‘Scrolling’ to enable the required variables.
Step 1: Log in to your Google Tag Manager console and click on ‘Tags’ in the left-hand side menu.
Step 2: Click on ‘New’ to create a new scroll event tag for your GA4 property.
Step 3: Give a proper name to your tag and click on ‘Tag Configuration’.
Step 4: An overlay will appear on the right-hand side with a list of tag templates. Select ‘Google Analytics: GA4 Event’.
Step 5: The tag configuration window will open, as below. Click on ‘Select Configuration Tag’.
Step 6: A drop-down menu will appear. You can select your pageview tag or ‘None- Manually Set ID’ from the drop-down. In our case, we will select ‘None- Manually Set ID’.
Step 7: The next step is to enter the GA measurement ID in the input box.
You can find your measurement ID in the ‘Admin’ section under ‘Data Streams’.
Step 8: Specify the name of the event. The event name you provide here will appear in your GA4 analytics reporting.
In our case, we want to measure vertical scroll events at 10%, 25%, 50% and 75%. So, we can add a ‘Scroll Depth Threshold’ variable. This will only provide a value like 10, 25, 50 and 75, but we want our event name to be more descriptive; hence we can add ‘%’ after selecting ‘Scroll Depth Threshold’ and text as ‘Scroll’.
This will give an event name as ‘10% scroll’, ‘25% Scroll’, ‘50% Scroll’ and ‘75% Scroll’.
Click on the settings icon with ‘+’ on it like below to add a variable.
Step 8.1: An overlay will appear like below. Select ‘Scroll Depth Threshold’.
Step 8.2: Add the ‘%’ sign immediately after the curly braces.
Step 8.3: Now, enter a space and add ‘Scroll’ as text in the input box.
You can also add parameters and user properties to the event, but this is optional. Additional parameters and user properties are nothing but custom dimensions that you would like to pass along with the event. Since the event name is sufficient to define the user activity, we are not adding any parameters or user property to this event.
Step 9: Now, let’s create a trigger condition to fire our tag. Click anywhere under ‘triggering’.
Step 10: An overlay will appear like below. Click on the ‘+’ icon to add a new trigger.
Step 11: Give a proper name to your trigger and click anywhere in ‘Trigger Configuration’.
Step 12: An overlay will appear like below. Click on ‘Scroll Depth’.
Step 13: Trigger configuration settings options will be available as below. You will get two checkboxes called ‘Vertical Scroll Depth’ and ‘Horizontal Scroll Depth’. You can select one based on your business need or even select both. In our case, we are tracking the vertical scroll only.
Select the ‘Vertical Scroll Depth’ option.
Step 14: You also get the option to measure the scroll depth in percentages or pixels. In our case, we are going to measure it by percentage scrolled. By default, the percentage radio button is selected. Add your threshold limits separated by commas in the input box like below.
Step 15: Click on the ‘Save’ button to save the trigger configuration.
Congratulations! You have successfully created your custom scroll tracking event. Now let’s debug it and preview it.
Debug and preview scroll events
Step 16: Click on the ‘Preview’ button (on the top right-hand side) to preview and test your new scroll tracking setup.
Step 17: New window will open with Google preview mode. Add the URL of your website and click on ‘Start’.
Step 18: Another new window will open with the specified URL. Now gradually scroll down your webpage until you reach the bottom. As you start scrolling down, you should see new ‘Scroll Depth’ events in the GTM preview mode tab, showing one after another under the ‘Summary’ column.
Step 19: Click on any ‘Scroll Depth’ event, and you should see your tag is firing like below.
Step 20: Click on the scroll tag name under ‘Tags Fired’.
Step 21: A new overlay will appear like below, providing details of our tag and trigger.
Note: You can see in the image above that the event name is ‘Scroll Depth Threshold% Scroll’. Here ‘Scroll depth threshold’ is the predefined variable, and ‘%’ and ‘Scroll’ are text values we provided while defining the event name.
Step 22: To check the value of ‘Scroll Depth Threshold’, click on ‘Data Layer’, and you can see the threshold value for the selected event from the summary tab.
Step 23: You can also check this in real-time in Google Analytics. Navigate to your analytics property and click on ‘Realtime’ in the left menu.
Step 24: You will see real-time scroll events firing for our custom threshold defined like below.
Congratulations, you have successfully set up a custom scroll tracking event for Google Analytics 4 using Google Tag Manager.
To check the event’s details in the GA4 console, you can click on ‘All Events’ on the left side reporting menu, and you will get the details of all scroll tracking events that occurred on the website like below.
Note: In the above image, you can also see an event as ‘Scroll’ with 152 counts. This event is predefined evet tracked by GA4 at the threshold of 90%.
Summary
Since Google Analytics 4 provides by default scroll tracking, it is limited to 90% of the scroll depth threshold. If you want to track custom threshold events (10%, 25%, 50%, 75%, etc.), you need to set up custom events using Google Tag Manager or global site tag.
Other articles related to GA4 (Google Analytics 4)
Frequently Asked Questions About Scroll tracking in Google Analytics 4 (GA4)
What are scroll tracking events in Google Analytics 4?
The scroll tracking event helps you understand how users scroll through your website in Google Analytics 4(GA4). Scroll tracking can be implemented on all websites.
Do GA4 track scroll tracking events by default?
In the case of Google Analytics 4, only 90% scroll is tracked by default, but if you want to track 25%, 50%, and 75% scroll events, you need to implement it using Google Tag Manager.
What are scroll tracking variables in GTM?
Whenever the scroll depth triggers, the following variables are automatically populated in GTM • Scroll Depth Threshold: This represents the numeric value of the scroll depth. • Scroll Depth Units: This represents the pixel or percentage of the scroll depth threshold. • Scroll Direction: Its value is either vertical or horizontal, indicating the direction of the scroll.
Register for the FREE TRAINING...
"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."
Here’s what we’re going to cover in this training…
#1 Why digital analytics is the key to online business success.
#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.
#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.
#4 Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.
#5 The number 1 reason why conversion optimization is not working for your business.
#6 How to advertise on any marketing platform for FREE with an unlimited budget.
#7 How to learn and master digital analytics and conversion optimization in record time.
My best selling books on Digital Analytics and Conversion Optimization
Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.
Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.
Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.
Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.
About the Author
Himanshu Sharma
Founder, OptimizeSmart.com
Over 15 years of experience in digital analytics and marketing
Author of four best-selling books on digital analytics and conversion optimization
Nominated for Digital Analytics Association Awards for Excellence
Runs one of the most popular blogs in the world on digital analytics
Consultant to countless small and big businesses over the decade
Learn and Master Google Analytics 4 (GA4) - 126 pages ebook
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
Cookie
Duration
Description
cookielawinfo-checkbox-analytics
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional
11 months
The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance
11 months
This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy
11 months
The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.