Les articles d'aide existent en allemand et en anglais. Vous les lisez ici en anglais.
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?
- 01Include the snippet or GTM tag once in your layout, as usual.
- 02Leave autoPageviews on. The SDK then measures the first page view and every further one where the address changes.
- 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.
- 04Keep reporting conversions through metrunio.conversion() or server-side.
- 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.
Dernière vérification le 12 oct. 2026
Également demandé
- React Router tracking
- SPA page views
- Integrate with Vue or Next.js
Articles connexes
- 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 thenmetrunio.goal('key')per step; from the backend withPOST /v1/server/eventsand an event of typegoalcarryinggoal_keyanduser_id. Both routes are equivalent; a step without a customer identifier is rejected.