Published by Engineering Team โข 5 min read
Modern web applications require high-frequency, non-blocking telemetry collection to capture user behavior without affecting page rendering performance. By leveraging navigator.sendBeacon and lightweight modular extension scripts, events such as pageviews, custom action triggers, and Core Web Vitals are transmitted efficiently over HTTP POST.
Extension modules extend the core collector pipeline. The scroll plugin (ext-scroll.js) registers passive scroll event listeners and monitors page scroll position relative to viewport height. Once a user scrolls past 25%, 50%, 75%, and 100% of the document height, milestone events are dispatched to the analytics server.
User engagement tracking includes idle state detection. The idle-ext.js plugin monitors user activity across mouse, keyboard, and touch events. If a user remains completely inactive for an extended period, an idle_break_start telemetry event is logged. When the user returns and resumes interaction, an idle_break_end event is recorded with the exact duration of the break.
When a user closes the tab or navigates to another page, an automatic page_exit payload is transmitted containing total visible time on page, max scroll depth achieved, and final Web Vitals scores. This completes the end-to-end user session trace displayed on the dashboard.