Our standard tracking code is “SPA-Aware”. This means it automatically detects when the URL changes in your application, even without the page reloading (soft navigation). This works via the browser’s native History API (Documentation Index
Fetch the complete documentation index at: https://docs.bchic.de/llms.txt
Use this file to discover all available pages before exploring further.
pushState, popState), which is used by almost all modern routers (React Router, Vue Router, Angular Router, etc.).
Insert Global Script
Since SPAs are usually controlled via a central
index.html or a root layout component (e.g., layout.tsx in Next.js or root.svelte in SvelteKit), you only need to insert the script once.Place the code as high up as possible in the <head> section of your main file.
