Analytics playbook
This playbook decides how we measure. Sources: docs/event-platform.md and the Doris README in nyuchi/data-infra, and the weather repository’s CLAUDE.md (analytics and location privacy).
The decisions
Section titled “The decisions”- No surveillance business model. Dignity is the default. Measure whether people were helped, not how long they were held. Every metric names the person it is about and what that person got.
- Each store has one job. Doris is for search and analytics: a database per domain,
searchandanalyticsworkload groups, loaded by Routine Load, with a nightly backup to R2. Redpanda carries the events, and with Flink supports open data and PII stripping, so what reaches Doris or the commons has already been made anonymous. Nothing writes an analytics table by hand. - Events follow the model. CloudEvents envelopes with Avro payloads from the canonical model. A new event type is a model change, not an ad hoc payload.
- Anonymous before analysed. Product analytics carry no personal fields. Locations are coarsened before they leave the browser: spot slugs become a 4-character geohash, URLs drop every query parameter except campaign attribution, coordinates are rounded to about 110 m in logs and analytics. The page URL itself, which people share, is untouched.
- Two layers. Web and app analytics (GA4 and Vercel Web Analytics today, with
trackEventas the one call) answer product questions. Platform analytics (Doris) answer service questions. They are not joined on a person. - Track the metric the work moves. Each product or feature names its growth metric (users, retention, community activity) before it ships; the entity scorecards are in the playbook for that product.
- Open data is separate. Anything published to the commons follows the Open data playbook.
- Tracking is planned. Use the tracking-plan process: model the product, audit current tracking, design the plan, then implement. Do not add events without a plan entry.
Where the platform’s measurement stands (2026-11-17)
Section titled “Where the platform’s measurement stands (2026-11-17)”- Doris is running with databases for analytics, search and the apps, and its news tables were empty because nothing feeds them yet (the bridge from MongoDB is an unmerged draft). Redpanda is running; the projectors that would feed Doris are not deployed. So platform analytics is designed and not yet producing.
- The weather app’s growth metrics (searches that end on a rendered page, install and push opt-in rates, retention) have no baseline: the events are not all defined. Define the event first, then the dashboard (see the Weather playbook).
- Mukoko News counts reading and searching on the device, in order to show a wall. As measured on 2026-09-14, its dependency tree carried no analytics package (
mukoko-news). Its open dashboard is built on the app’s own corpus and is cached, not tied to any person. - Notification delivery is counted without logging who (see the Notifications playbook).
Open for the owner
Section titled “Open for the owner”- Whether GA4 stays, given decision 1. The location-privacy rules reduce the exposure but do not remove the third party.