Install guide · framework · ~2 min
Drop into src/layouts/Layout.astro.
Astro renders to static HTML by default — the Admaxxer snippet in the site-wide <head> of your root layout is the simplest, SSR-safe approach. No client hydration needed.
Edit src/layouts/Layout.astro (or whichever layout wraps your pages).
Paste the tag inside the <head> block, replacing YOUR_WEBSITE_ID and yourdomain.com with your values.
src/layouts/Layout.astro astro---
const { title } = Astro.props;
---
<html>
<head>
<title>{title}</title>
<script defer
data-website-id="YOUR_WEBSITE_ID"
data-domain="yourdomain.com"
src="https://admaxxer.com/js/script.js"></script>
</head>
<body><slot /></body>
</html>
Load any public page on your site in a fresh browser tab. Within a few seconds, the Admaxxer dashboard realtime view should show the event. If nothing lands after 2 minutes, re-check the snippet is actually in the rendered HTML <head> (View Source, not just DevTools).