Frameworks and SPAs
Pertento for Angular
One tag in index.html covers the whole application, and variants are reapplied as the router swaps views.
One script tag · 0.9 KB loader · no cookiesAll integrations
An Angular application serves a single index.html, which makes the install a single edit: the tag in the head, above the application bundle. Because the router replaces views rather than loading documents, Pertento watches for the view to change and applies the variant to whatever is now on screen. Assignment is made once and held, so a visitor navigating a dozen routes is measured as one visitor in one variant rather than as a dozen.
How it connects
- Add the tag to the head of index.html, above the application bundle.
- Expect variants to reapply as the router changes views.
- Target by route pattern rather than by component name.
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