Piwik PRO automatically tracks page scrolls on your website. It then saves the scroll data as custom events and shows results in custom reports or in the site inspector for Chrome.
However, if you want to change the way page scrolls are tracked, you can use a manual method.
Turn off automatic scroll tracking
Available from 16.17.0. In versions below 16.17.0, just skip this step.
The first thing you need to do is turn off the automatic scroll tracking, otherwise the data will be collected twice.
To turn off automatic scroll tracking, follow these steps:
- Go to Menu > Administration.
- Navigate to Sites & apps.
- Choose the site or app you want to work with.
- Navigate to Data collection.
- In Page scrolling, turn off Measure scroll depth.
- Done!
Set up custom events with scroll triggers
Next, you need to create custom event tags for different scroll points. You can go with the easy option of four tags at 25%, 50%, 75% and 100%, or pick your own points.
When creating a custom event tag, you can use the following framework:
- Event category: built-in page scroll (or
Heatmap events
for versions below 16.17.0)Note: Use exactly this name if you want to use the collected data for scrollmaps in the site inspector for Chrome.
- Event action: 25%, 50%, 75% and 100%
- Event name: Leave it empty if you want to collect data for scrollmaps in the site inspector for Chrome.
Note: Each custom event contains information about a page URL so you don’t need to include it in custom event settings.
We’ll show you how to set up a custom event tag for a 25% scroll mark, and you’ll be able to repeat these steps for other marks.
To set up the tag for a 25% scroll mark, follow these steps:
- Go to Menu > Tag Manager.
- Click Add a tag.
- Name the your and select the following type: Custom event.
- Click Next.
- Fill in the following fields:
- Category:
built-in page scroll
(orHeatmap events
for versions below 16.17.0) - Action: 25%
- Name: – (Leave it empty.)
- Category:
- In Tag triggers, click Add a trigger.
- Name the trigger.
- In Event type, choose the following type: Page scroll.
- Click Next.
- In Amount of page scrolled, set the percentage to 25%.
Tip: Percentage depth is the most common way to grasp scroll depth. However, if you prefer an absolute measure, switch from percentages to pixels and track the scroll distance in pixels. This is handy for comparing across devices with varying relative percentage heights.
- (Optional) In Event conditions, define trigger conditions. You can choose to fire your tag only on certain pages.
- In Multiplicity, select Once for each page view. This is the best option to see how far people scroll down the page.
- When you’re done, click Save.
- Test your tag in debug mode.
- When you’re happy with how the tag works, click Publish.
- Done! Now you’re collecting scroll data.
You can now repeat these steps to set the 50%, 75% and 100% marks. Remember to change the action to 50%, 75% and 100% and the percentages in your trigger settings.
Set up reporting for page scrolls
As the last step, you can set up a custom report to see page scrolls for each page.
To set up reporting for page scrolls, follow these steps:
- Go to Menu > Analytics.
- Navigate to Custom reports.
- Click Add a report.
- Choose the following report type: Table.
- Name your report. Example:
Page scrolls
. - In Visibility, choose Author or All users. All users lets you share this report with your teammates.
- In Nested dimensions, set the following dimensions:
- Page URL
- Custom event action
- Add the following metrics:
- Custom events
- Unique custom events
- (Optional) Set up Default sorting options.
Tip: Default sorting makes the data appear in your report in a specific order based on the selected dimension or metric.
- In Filter dimension, set the following filter:
Custom event category is built-in page scroll
. - Click Save.
- All done! You can now view scroll data when clicking on a page URL.