<head> of your base layout with is:inline. It tells Astro to leave the tag exactly as written, so it stays a plain script that runs before the page shows.
src/layouts/Layout.astro
- Islands: with
data-await-hydration="true", pagent waits for islands withclient:loadandclient:idleto hydrate. Islands withclient:visibleorclient:mediahydrate later, so test variants inside them with a preview link. - No islands? A fully static Astro site doesn’t hydrate, so you can leave out
data-await-hydration. - View transitions: navigation with Astro’s client router is tracked automatically.
Check it worked
- Deploy, then open your site in a private browser window.
- Back in pagent, click Check connection in the install step.
- Open a test’s preview link and check that the variant shows and stays after the page has finished loading.