Skip to content

Installation

How do I measure a single-page app?

With automatic page views (autoPageviews, on by default) the SDK also counts route changes without a reload: it notices every address change through pushState, replaceState and the back button. Call metrunio.page() yourself only if your router switches views without changing the address, or if you have turned autoPageviews off.

What do I do if route changes without a reload are not counted?

  1. 01Include the snippet or GTM tag once in your layout, as usual.
  2. 02Leave autoPageviews on. The SDK then measures the first page view and every further one where the address changes.
  3. 03If your router switches views without changing the address, call metrunio.page() there. With autoPageviews on, do not also call it on every address change: the same page view could then count twice.
  4. 04Keep reporting conversions through metrunio.conversion() or server-side.
  5. 05Report funnel steps of an application through metrunio.goal(), after a single metrunio.identify() at sign-in and not on every route change. A second call of the same step does not count again.

Caution

Do not call init() again on every route change. The SDK then reports DOUBLE_INIT. One init call per page load is enough.

Last reviewed on 12 Oct 2026

Also asked

  • React Router tracking
  • SPA page views
  • Integrate with Vue or Next.js

Related articles

  • What does the tracking SDK offer?

    Which JavaScript calls are available?

    The SDK provides init, setConsent, page, track, identify, conversion, goal and reset, plus paymentReference for Stripe and PayPal, fillForm for forms, and renderSurvey and survey for the post-purchase question. It loads asynchronously, queues calls made before it loads, and sends events in batches.

  • How do I install the code snippet?

    How do I install Metrunio without a tag manager?

    The finished code block is in the portal under “Setup → Snippet” and contains site ID and collector address. You see the write key only once, when it is created; if it is no longer known, the code carries the placeholder YOUR_WRITE_KEY and a button next to it creates a new one. The block belongs immediately before the closing head tag and loads asynchronously.

  • How do I report a funnel step?

    How do I send the steps of my funnel from the browser or the backend?

    In the browser with metrunio.identify(userId) once after sign-in and then metrunio.goal('key') per step; from the backend with POST /v1/server/events and an event of type goal carrying goal_key and user_id. Both routes are equivalent; a step without a customer identifier is rejected.

See what your data tells you.

Look around in the demo first. Your own account is currently available by invitation only.

Open the demoRequest access