Intempt
  1. Installation
Intempt
  • Installation
    • Basic Intempt Installation
    • Create source
    • Web Snippet
    • Google Tag Manager
    • Autocapture setup
    • SPA tracking
    • Environment Setup
    • Validating Installation
  • SDK
    • JS SDK
    • Android SDK
    • iOS SDK
    • Node.js SDK
  • API Reference
    • Track data
      POST
    • Consent
      POST
    • Choose API
      POST
    • Recommendations Feed API
      POST
  • Data Ingestion & Tracking
    • identify()
    • track()
    • record()
    • alias()
    • group()
    • consent()
    • intempt:html / intempt:page / intempt:session
    • Product Catalog Ingestion via API
  • Data Models & Event Schema
    • Event Schema Overview
    • Required Fields
    • Attribute Schema
    • Product Catalog Schema
  • Webhooks
    • Webhook Configuration
  • Server Side Experiments
    • Overview
    • Choose API endpoint
    • Handling Experiment Response
  1. Installation

SPA tracking

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
Previous
Autocapture setup
Next
Environment Setup
Built with