Add cookie-free analytics to your Remix app with one script include in your root document. Beam keeps routing analytics clean without introducing consent-banner overhead.
No credit card required and setup in minutes
Replace YOUR_SITE_ID with your Beam site ID from the dashboard.
// app/root.tsx
import { Links, Meta, Outlet, Scripts } from '@remix-run/react'
export default function App() {
return (
<html lang="en">
<head>
<Meta />
<Links />
</head>
<body>
<Outlet />
<Scripts />
<script
defer
src="https://beam.keylightdigital.dev/js/beam.js"
data-site-id="YOUR_SITE_ID"
/>
</body>
</html>
)
}
Placing Beam after <Scripts /> keeps hydration order clean and avoids render blocking.
import { useEffect } from 'react'
import { useLocation } from '@remix-run/react'
function BeamPageTracker() {
const location = useLocation()
useEffect(() => {
window.beam?.track?.('route_change', { path: location.pathname })
}, [location.pathname])
return null
}
// Mount <BeamPageTracker /> in app/root.tsx body
Beam auto-captures standard pageviews; this optional hook helps if your app has advanced transition patterns.
Use this checklist after publish so you know tracking is actually live in production.
Beam keeps Remix builds cookie-free and avoids legal UI work tied to traditional analytics tools.
Async script loading keeps server-rendered response performance strong.
Track which Remix paths and funnels are performing without wiring heavy analytics SDKs.
No personal identifiers or ad-tech integration means lower compliance risk.
Start free, validate your first pageview, and then scale when traffic grows.