Measure Measure
Sign In Start Free Trial

Documentation

SPA Support

Automatic tracking for single-page applications.

How it works

Measure automatically detects client-side navigation. When your app uses history.pushState or the user navigates with the browser's back/forward buttons, we count it as a new pageview.

No additional configuration is needed. The same script tag you added during installation handles everything.


What we listen for

The Measure script monitors two browser APIs to detect navigation:

history.pushState

Called by frameworks like React Router, Vue Router, and SvelteKit when navigating between routes. Measure intercepts this call and sends a pageview for the new path.

popstate event

Fires when the user clicks the browser's back or forward buttons. Measure listens for this event and records the new page.


Framework compatibility

Because Measure hooks into standard browser APIs, it works with any framework that uses client-side routing:

Next.js
Nuxt
SvelteKit
Remix
Astro (View Transitions)
React Router
Vue Router
Angular
Gatsby

Next steps

Continue exploring the documentation.