beam-examples
April 10, 2026 · View on GitHub
Working integration examples for Beam — privacy-first, cookie-free web analytics.
Examples
| Framework | Example | Description |
|---|---|---|
| Next.js | examples/nextjs/ | App Router + Pages Router integration with next/script |
| Astro | examples/astro/ | Astro layout integration via <head> |
| SvelteKit | examples/sveltekit/ | SvelteKit integration in app.html |
Each example includes:
- ✅
README.mdwith "Run in 2 minutes" instructions - ✅
.env.examplefor your BeamSITE_ID - ✅ Minimal project structure ready to run
Quick Start
- Sign up at beam-privacy.com (free tier available)
- Add a site in the dashboard and copy your
site_id - Pick the example that matches your framework
- Follow the README in that folder
Installation
npm install @keylightdigital/beam
Or use the script tag directly:
<script defer src="https://beam-privacy.com/js/beam.js" data-site-id="YOUR_SITE_ID"></script>
What Beam Tracks
- Page URL and path
- Referrer source
- Screen width (device type detection)
- Country (from Cloudflare headers — no IP stored)
- Browser
- Language
What Beam does NOT track: cookies, IP addresses, personal data, fingerprinting, localStorage
Links
- 🌐 Product: https://beam-privacy.com
- 🚀 Live demo: https://beam-privacy.com/demo
- 📚 Docs: https://beam-privacy.com/docs/api
- 📦 npm: https://www.npmjs.com/package/@keylightdigital/beam
- 🔒 Privacy: https://beam-privacy.com/privacy
- ⭐ Main repo: https://github.com/scobb/beam
License
MIT — see individual example directories.