beam-examples

April 10, 2026 · View on GitHub

Working integration examples for Beam — privacy-first, cookie-free web analytics.

Beam npm

Examples

FrameworkExampleDescription
Next.jsexamples/nextjs/App Router + Pages Router integration with next/script
Astroexamples/astro/Astro layout integration via <head>
SvelteKitexamples/sveltekit/SvelteKit integration in app.html

Each example includes:

  • README.md with "Run in 2 minutes" instructions
  • .env.example for your Beam SITE_ID
  • ✅ Minimal project structure ready to run

Quick Start

  1. Sign up at beam-privacy.com (free tier available)
  2. Add a site in the dashboard and copy your site_id
  3. Pick the example that matches your framework
  4. 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

License

MIT — see individual example directories.