Open AnalyticsOpen Analytics
Home/Documentation

Introduction

Open Analytics is an open-source web analytics stack: a Next.js dashboard, a lightweight tracker.js, and Supabase for storage and realtime. Events are sent directly from the browser — no dedicated ingest server required.

What you get

  • Landing page — product overview at /
  • Dashboard — manage websites, view stats, copy embed code at /app
  • Per-site analytics — visitors, visits, pageviews, bounce rate, visit time, breakdowns (channels, pages, geo, device, browser, UTM)
  • Realtime — 3D globe and live visitor list at /app/[siteId]/realtime
  • Tracker — pageviews, page leave, custom events, SPA navigation, UTM capture, bot filtering

Architecture

Open Analytics uses two Supabase roles:

  1. Registry project (configured in .env.local) — stores the list of websites, each site's site_key, and credentials to that site's data project.
  2. Per-website project — one Supabase project per tracked site. Run supabase/schema-analytics.sql on your project; all events for that site live in this database.
When you add a website in the dashboard, the app verifies it can read events on your project and saves a row in app projects with your Supabase URL, publishable key, and an auto-generated site_key for the tracker.

Data flow

  1. Visitor loads a page with tracker.js.
  2. Tracker builds a fingerprint-based visitor_id, session/visit IDs, parses device/browser/UTM, optionally fetches geo (cached).
  3. Events are inserted into the site's Supabase events table (or POSTed to a custom data-endpoint).
  4. The dashboard reads events from the site project and aggregates metrics in the Next.js app. Realtime uses Supabase Realtime on events.

Documentation sections

Quick start

  1. Follow Installation to run the dashboard.
  2. Complete Supabase setup (schema-app.sql + schema-analytics.sql) projects.
  3. Add a website in the dashboard and paste the snippet from Tracking script.
  4. Open Metrics to understand reported numbers.