BaseEvents
Self-hosted event analytics, queried by your agent.
What it is
BaseEvents is a lightweight event pipeline you self-host. A tracker script, a server endpoint, and a Supabase events table. About 600 lines of code total.
It captures pageviews, SPA route changes, identities, and any custom event you fire. UTMs, location, device, and referrer come along for the ride.
There is no dashboard. Your interface is the AI agent you already work with in Cursor, Claude, or Codex. Ask it your top pages last week. Ask it where signups dropped. It writes the SQL and tells you.
Get started
Install with your agent.
Paste into Claude Code, Cursor, or Codex inside your project.
Pre-flight
Set up BaseEvents following the instructions at https://github.com/dmonsef/baseevents/blob/main/SETUP-BASEEVENTS.md~5 minutes if your Supabase project is already created · Vercel + Supabase free tiers
What you get
Pageviews and SPA routes
Tracks initial loads plus pushState, replaceState, and popstate. Works across Next.js, Vite, Astro, SvelteKit, Remix, and plain HTML.
Identity stitching
Anonymous events backfill to a user_id when you call identify(). The full pre-signup journey stays queryable.
Server-side enrichment
Country, region, city, and timezone come from Vercel's request headers on deployed apps. No MaxMind, no Cloudflare hop, no third party.
IP-private by default
Raw IP is hashed with a server-side salt before insert. Nothing PII-shaped touches the database.
Agent-queryable
No dashboard to build or maintain. Ask your agent for stats. Set a scheduled task for daily summaries.
Self-hosted data
Everything stays in your Supabase project. No SaaS subscription, no per-event fees, no fair-use throttle.
The category
“SaaS applications, or biz apps — the notion that business applications exist, that will probably collapse in the agent era.”
Software as an Agent. Read the essay →
SaaA is software designed to be operated by an agent rather than a human.
Want top pages? Ask your agent. Want to delete a visitor's events? Ask your agent. Want a daily traffic email? Set up a scheduled task.
BaseEvents is SaaA for site analytics.
Built by
Darius A Monsef IV
@bubs
3x YC Founder. 2 exits. Built Creative Market (acquired by Autodesk, 2014) and Sightbox (acquired by J&J, 2017).
BaseEvents started as my own tool. Sharing it open source.