Build a bounded, single-product event-analytics tool — not a general analytics platform. Use a lightweight browser SDK (a small JS snippet) that sends named custom events with arbitrary properties to your own ingestion endpoint. Use ClickHouse (genuinely well-suited to this — columnar storage makes funnel and retention queries fast even at moderate volume) or Postgres if you'd rather keep one database, with Next.js/TypeScript for the ingestion API and dashboard. Ingest events idempotently (dedupe by a client-generated event ID) and filter obvious bot traffic by user-agent pattern; do not fingerprint devices beyond a first-party, cookie-based anonymous ID. Build three dashboard views from the raw event table: a funnel builder (pick an ordered sequence of event names, see conversion between each step), a retention chart (percentage of a cohort that returns on day N), and a simple event-property breakdown (e.g. count of purchase events grouped by a plan property). Add a raw-event export and a data-deletion endpoint for a given anonymous ID, to keep this genuinely privacy-respecting rather than just smaller-scale surveillance. Do not build cross-device identity graphs, session replay, or a general BI/warehouse layer — those are out of scope; this tracks one product's events for one team, nothing broader. Requires hosting and a database (ClickHouse or Postgres); no external API key needed.