What does this recipe do? Adds automatic scroll tracking to every page on your site and sends events to Google Analytics. By default, tracks user scroll depth at the 25%, 50%, 75%, and 100% mark, but can be customized.
All events (pushed to Google Analytics) are set as non-interaction hits, thus they will not affect your bounce rate or time on website/page metrics.
INSTRUCTIONS
- Download Container File
Download the container JSON file (right-click on the link and click “Save Link As” or “Save Target As” to save the JSON file to your computer). - Import JSON File into GTM
Log into your own Google Tag Manager container and head to the Admin section of the site. Under Container options, select Import Container. Read this blog post for more details about importing a container file. - Replace the already existing GA Settings Variable with your own
Currently, the GA Event – Scrolling tag is using the GA Settings Variable named {{REPLACE THIS VARIABLE WITH YOUR OWN GA SETTINGS VARIABLE}}. Click that field and pick your already existing GA Settings Variable instead. - Preview & Publish
Use the Preview options to test this container on your own site. Try testing each of the events to make sure they’re working properly. If everything looks good, go ahead and publish! - Optional – Update Scroll Breakpoints
You can customize how often events fire by editing the Scroll trigger. Go to Triggers > Scroll and in the Percentages field (under the Vertical Scroll Depths section) change the values. Separate each value with a comma
View all 40+ Google Tag Manager Recipes