SPA Tracking Basics#
Single-page applications (SPAs) load content dynamically without full page reloads. When implementing Intempt on an SPA, it’s important to ensure that page-like interactions are still tracked correctly even when the URL changes without refreshing the browser.Intempt’s web snippet handles SPAs by listening for changes that occur in dynamic environments and continuing to capture events as users navigate within the application.
How Autocapture Behaves in SPAs#
Once the Intempt snippet is installed in your base HTML template, autocapture will:Continue tracking UI interactions (clicks, inputs, form submissions) as the SPA updates content
Capture changes on newly rendered components without needing additional code
Work even when your SPA restructures or rerenders UI sections
Because the snippet lives in the core page template, it remains active throughout the SPA lifecycle.
Page Views in SPAs#
Since SPAs do not reload the entire page, URL changes may not automatically trigger new page-view events.
Autocapture still records interactions within the SPA, but additional configuration may be required if you want each virtual navigation step to be treated as a page view.(Developers may implement custom events later for SPA navigation if needed.)
Key Notes#
The snippet must be placed in your SPA’s main HTML template (<head> and before </body>), ensuring Intempt stays active across all client-side navigations.
Autocapture automatically detects new or updated components—ideal for SPAs where content updates dynamically.
For advanced tracking of SPA route changes, custom events can be added after basic setup.
Modified at 2025-12-03 10:39:34