Automatic tracking of how far users scroll on each page.
Palace Tracker automatically monitors scroll behavior throughout the user's visit. The maximum scroll depth reached on each page is recorded and sent when the user navigates away or closes the page.
Scroll depth is calculated as a percentage (0-100%) representing how far down the page the user scrolled relative to the total document height.
The scroll depth data is included in the page_exit event:
{
"eventType": "page_exit",
"data": {
"duration": 45,
"maxScrollDepth": 87
}
}In this example, the user scrolled to 87% of the page's total height.
Scroll depth tracking helps you understand:
The tracker listens to scroll events and continuously updates the maximum scroll depth reached. The final value is sent just before the user leaves the page (via the beforeunload event).
For single-page applications, the scroll depth resets to 0 when navigating to a new route, and a new maximum is tracked for each page.