Frameworks and SPAs
Pertento for Astro
Static HTML on disk, so a variant is applied in the browser and starting or stopping a test costs no rebuild.
One script tag · 0.9 KB loader · no cookiesAll integrations
Astro ships zero client JavaScript by default and renders pages at build time, which changes what an experiment is. The pages are already on disk, so Pertento applies the variant in the browser rather than anything being rebuilt: starting, stopping or changing a test costs no deploy. The tag goes in the shared layout head. Where a change genuinely belongs in the build, that is a deploy rather than an experiment, and it is worth knowing which of the two you are doing.
How it connects
- Add the tag to the head of the shared layout, so every page inherits it.
- Expect variants to be applied client-side; a test needs no rebuild to start or stop.
- Target by URL pattern, which maps cleanly onto Astro’s file-based routes.
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