Every event kept one by one and asked of later: who came back, how far people got, what they did next, who is new and who has gone quiet; feature flags and experiments; dashboards. Two declarations, log and fact, and the usage extension's panel on them.
log and factA log is an append-only, ordered, durable log (SQLite segments in a file of its own, synced on each write, or tables in Postgres beside the models, appends of one turn written together), read in order by consumers that each keep their place, at least once; its door takes events from other sites, PostHog's shape included. A fact is an analytics table, on SQLite, in Postgres beside the models, or in a ClickHouse MOTE_ANALYTICS names; the same questions are written for either.
docs/analytics.md has the whole of both: the operations, how a log is kept and what it costs (about 245,000 rows a second at a thousand a call, synced), the questions and their answers, and the ClickHouse tables it makes.
The panelAnalyticsPanel over eight weeks of a made-up shop: 600 people from search, the newsletter and social, most looking once, some coming back, some signing up and buying. Trends against the span before; a retention grid by day, week or month; new and returning, how often and how lately; stickiness and lifecycle; a funnel with its drop-off and window; paths; people and a person's timeline; dashboards of saved insights; live. Each part filters by a field or a property, folds to a phone's width, and follows light and dark.
Nobody is signed in.
Make a demo account (or sign in on the Back end page), then show the demo shop: the whole panel appears here.
Feature flags and experimentsA flag is on or off, or one of several variants by weight, for a share of people, for people who fit its rules. A person's answer is the same every time (PostHog's hash of the flag and the person), and each answer is an exposure, which is what an experiment's readout counts: of the people shown each variant, how many then reached the goal, the lift, and the chance it beats the control. The panel's Flags tab shows the demo's one-page checkout.
Rules: {prop: "plan", is: "pro"}, {prop: "country", in: ["DE", "FR"]}, {cohort: id}. Cohorts are people who did something (twice in 30 days), people of a property, or people named.
What it keepsNo IP address is kept: the door bounds a sender by its address in memory, for the minute, and a property called ip is let go. A browser that asks not to be tracked (Global Privacy Control, Do Not Track) is counted for nobody. usageForget(who) takes a person's events, and their visitor ids, out of the store. Session recording and replay are left out on purpose: a recording keeps whatever was on a screen, which is more than a program's owner should hold.
Heatmaps go as far as how often each control was pressed (autocapture's click): no positions are kept.