Replace PostHog?

NOT REALLY · don't bother
catalog price reference variescategory 📊 analyticsreported replacement votes 0

First-party collection and a dashboard that answers your top five questions is one sitting of work, and PostHog's free tier covers a million events a month before you pay anything. What the bill buys past that is the rest of the platform: session replay, feature flags, SQL over years of events, and ingestion that stays correct while your event schema drifts underneath it.

the prompt
Build me a self-hosted web analytics box to replace PostHog. Requirements:

- One Node 22 + Express process with better-sqlite3, serving the collector and the
  dashboard on port 8787. No frontend framework, no build step, no Docker.
- A tracker.js I paste on my sites: pageviews on load and history change, plus
  window.track('signup', { plan: 'pro' }), POSTed to /e on my own domain so
  collection stays first-party.
- One SQLite events table: site, event, path, referrer, UTM fields, country from the
  proxy header, device class, and a JSON properties blob.
- Count visitors by a daily-rotating salted hash of IP plus user agent, salt in .env.
  No cookie, never the raw IP. That is the whole privacy design, keep it.
- Dashboard at / with a date range picker: visitors and pageviews by day, top pages,
  referrers, countries, any event split by one property, and a three-step funnel.
- Nightly rollup into a daily-summary table, raw events pruned past the retention
  window in .env, /export.csv for the raw rows.
- Basic auth on the dashboard, collector open. No accounts, no telemetry, my box
  holds the only copy.
- Out of scope: session replay, feature flags, and stitching one person across
  devices. Do not build a plugin system or a warehouse connector.
- README: the snippet to paste, where the SQLite file lives, and how to back it up.

$ open in your agent (prompt prefilled, you press enter) or copy it raw

why people still pay

Teams pay because analytics has to keep collecting and stay trustworthy while the product changes underneath it. The bill buys bot filtering, identity resolution, late-arriving data, retention, query cost, and someone else getting paged when ingestion stops. The charts are the cheap part.

what you lose

xsession replay

xfeature flags and experiments

xidentity stitching across devices

xSQL over years of events

xingestion that stays up without you watching it

prior art to inspect before buildingUmamiPopular open-source privacy-focused web analytics platform.
reported replacements · 0share on X ↗"PostHog replacement research and build prompt"
questions
What does the PostHog verdict mean?

The directory does not recommend replacing this one from a prompt. A pipeline that never quietly stops collecting is the product, and that is the part you inherit when you self-host. Read the breakdown above.

What price does this directory record show for PostHog?

PostHog's pricing is usage-based or varies by plan. No stable monthly subscription; pricing is usage based with a free allowance. Page checked 2026-07-31: product analytics free to 1M events/month, then from $0.00005/event..

What do I lose by replacing PostHog?

Honestly: session replay; feature flags and experiments; identity stitching across devices; SQL over years of events; ingestion that stays up without you watching it. If any of those are load-bearing for you, keep paying.

Is there an open-source alternative to PostHog?

The listed prior art includes Umami (Popular open-source privacy-focused web analytics platform.). Inspect those projects before starting from a blank prompt.