If your site is a single-page application — React, Vue, Angular, or any other framework where navigation happens client-side without full page reloads — Personyze needs explicit configuration to track those route changes. Otherwise, the entire SPA looks like one page view to Personyze, and personalization that depends on URL/route won’t fire on subsequent navigations.
Enabling SPA mode
Go to Account Settings → General Settings → Tracker Settings and switch the Single Page Application toggle to On.
Once enabled, every URL change in your SPA does the following:
- Adds a new entry to the visitor’s page-view history
- Re-evaluates audience matches for the new URL/route
- Replaces any prior page-view-scoped placeholder content with content for the new route
- Fires goal tracking and other URL-conditional rules
How detection works
Personyze listens for the standard SPA navigation signals — history.pushState, history.replaceState, and popstate events. Most modern frameworks (React Router, Vue Router, Next.js client-side nav) emit these correctly. If your framework uses hash-based routing (#/route URLs), Personyze also tracks those.
Verifying SPA tracking is working
- Open dev tools, network tab, filter by
counter.personyze.com. - Navigate within your SPA without a full reload (click an internal link).
- You should see a new request fire to
counter.personyze.comwith the new URL. - In Personyze admin, go to Visitors Activity in Real-Time and confirm both URLs appear in your test session’s history.
Cross-domain tracking
SPA mode is independent from cross-domain tracking, but they often pair together. If your visitors move between multiple domains in your account (e.g., from marketing.brand.com to app.brand.com), enable both — see the Cross-Domain Tracking guide for that setup. Together, SPA mode and cross-domain tracking ensure a single visitor maps to a single Personyze profile across every route on every domain.
Troubleshooting
- Personalization doesn’t update on route change. Confirm SPA mode is on, then check that your campaign’s targeting includes the new URL pattern (not just the initial landing URL).
- Inflated page-view counts. Some SPAs fire
pushStatefor non-navigation purposes (modal opens, tab switches). If you see suspiciously high page views, audit your routing code or contact support — we can configure URL filters to ignore specific patterns. - Goals not firing. Goals defined as “URL contains X” will now fire on every SPA route that matches. If that’s too liberal, add a more specific URL condition.