Frameworks and SPAs
Pertento for Vue
Install once in the app’s HTML entry point; targeting is re-evaluated on each route change without reassigning the visitor.
One script tag · 0.9 KB loader · no cookiesAll integrations
Vue applications install the same way as any other single-page app: the tag goes into the entry HTML document, not into a component, so it is present before the app mounts. From then on it follows the router: targeting rules are checked against each new path, while the visitor’s assignment stays fixed. Nuxt applications that server-render can additionally use the SDK for tests that change what the server sends.
How it connects
- Put the tag in the entry HTML document’s head rather than in a component.
- Let the router navigate normally; variants are reapplied without a reload.
- Add the SDK on the server side only when the experiment changes the rendered response.
More in Frameworks and SPAs
All integrationsNext.jsRender the tag in the root layout so it loads before hydration, and variants persist across client-side route changes.How it connectsNuxtOne entry in the app head configuration covers every route, and it lands in the server-rendered HTML rather than after hydration.How it connectsReactA single-page app needs the tag once, in the HTML shell. Variants survive routing rather than being reapplied per view.How it connects