Single-page apps

Wazlytics works with single-page apps — React, Vue, Svelte, and friends — out of the box. There’s usually nothing extra to wire up.

History API routing

Most SPA routers (React Router, Vue Router, and similar) navigate using the browser’s History API. Wazlytics watches for those route changes automatically and records a pageview for each one — no extra code. Changes that only touch the query string are treated as the same page, so you won’t get inflated counts from filters or sort parameters.

Hash-based routing

If your app routes through the URL hash instead — paths like /#/dashboard — turn on hash routing in your init call so each hash change counts as a pageview:

wazlytics.init({ hashBasedRouting: true })

Custom events in your app

Track in-app actions the same way you would anywhere else — call wazlytics('Event name', { props: { … } }). If a particular navigation ever isn’t picked up automatically, you can record it explicitly with wazlytics('pageview').

Tip

See The tracking snippet for the full event API and examples.