Beacon
Self-hosted page view analytics. A single Go binary + SQLite. No JavaScript SDK bloat, no cookies, no fingerprinting. Just: which pages are people reading?
Motivation
I wanted analytics for personal projects but did not want to use Google Analytics (too heavy, too invasive) or Plausible (monthly subscription for side projects).
Beacon is a ~1MB Go binary that ingests events via a tiny 400-byte pixel, stores them in SQLite, and serves a dashboard. It runs on the cheapest VPS available.
Architecture
Browser → GET /pixel.gif?p=/blog/post → Go server → SQLite
↓
Dashboard (HTMX)
The tracking pixel approach means:
- No JavaScript required on the tracked site
- No cookies set, ever
- Works even with ad blockers (mostly)
- Sub-millisecond response time
Stack
| Component | Technology | Reason |
|---|---|---|
| Server | Go + net/http | Single binary, low memory |
| Storage | SQLite + WAL | Zero-dependency, fast reads |
| Dashboard | HTMX + Go templates | No JS build step |
| Deploy | Single binary | scp + systemd, done |
Self-hosting in 3 commands
# Download the binary
curl -L https://github.com/yourusername/beacon/releases/latest/download/beacon-linux-amd64 -o beacon
chmod +x beacon
# Run it
./beacon --port 8080 --db ./analytics.dbThen add to your HTML:
<img src="https://your-beacon-server.com/pixel.gif?p=/page-path"
width="1" height="1" style="display:none" />That's the entire integration.