Frameworks and SPAs
Pertento for Remix
The tag renders in the root route’s head, and the SDK runs inside loaders for anything settled server-side.
One script tag · 0.9 KB loader · no cookiesAll integrations
Remix renders on the server and leans on loaders, which splits an experiment neatly in two. Anything visible in the markup is handled by the tag, rendered in the root route’s head so it is in the first response. Anything settled before the response exists, a different set of results or a different price, is handled by the SDK inside the loader. Both read the same assignment, so the page and the data it was given never disagree about which variant this is.
How it connects
- Render the tag in the root route head, above the hydration bundle.
- Call the SDK inside loaders for server-side decisions.
- Keep one visitor identifier across the loader and the page.
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