Beam aligns with Astro's lightweight philosophy: one script tag, no cookies, and no build-time dependency. Works with static, SSR, and hybrid rendering.
No credit card required and setup in minutes
Replace YOUR_SITE_ID with your Beam site ID from the dashboard.
---
// src/layouts/BaseLayout.astro
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<slot name="head" />
</head>
<body>
<slot />
<script
is:inline
defer
src="https://beam.keylightdigital.dev/js/beam.js"
data-site-id="YOUR_SITE_ID">
</script>
</body>
</html>
Use is:inline so Astro does not transform the script and it is emitted exactly once per page.
---
// src/layouts/BaseLayout.astro
import { ViewTransitions } from 'astro:transitions'
---
<html>
<head>
<ViewTransitions />
<script
is:inline
defer
src="https://beam.keylightdigital.dev/js/beam.js"
data-site-id="YOUR_SITE_ID">
</script>
</head>
<body><slot /></body>
</html>
Beam handles SPA-like transitions so route-level pageview coverage stays accurate without extra client hooks.
Use this checklist after publish so you know tracking is actually live in production.
Astro sites focused on simplicity can keep privacy messaging clean with no analytics cookie banners.
Beam is a plain script include with minimal runtime footprint and zero bundling cost.
Beam tracks route changes in Astro navigation flows so your dashboards do not undercount.
See what pages, channels, and devices are performing without exporting data to ad platforms.
Start free, validate your first pageview, and then scale when traffic grows.