GuideIntermediate
Product Analytics Instrumentation
Knowing which metric to watch is useless if the data behind it is recorded badly. This guide covers the other half: how a product ends up measured. You write the tracking plan from the decisions that need to be made, name and version every event with a schema that is validated on the way in, connect the anonymous visitor with the user who signs up, compute funnels and retention in SQL over your own events table, control a feature with an open feature flag SDK, log experiment exposure so the analysis is valid, clean the data (duplicates, lost events, bots, broken clocks), and decide whether recording sessions is worth its privacy cost. You learn it by instrumenting **Turnito**, a fictional booking app for barbershops, tattoo studios, and salons in Latin America and the United States. You are asked to "measure onboarding" and find that the existing `track("click")` calls answer nothing. Ten simulated weeks of Turnito flow through your collector: more than 130,000 events with the problems real data has. The naive funnel says there are more bookings than shared links, the onboarding checklist experiment looks like a win until a sample ratio check exposes a logging bug, and the session replay stores a client's phone number nobody meant to record. Everything runs on your laptop with Docker: Postgres 18, flagd (the OpenFeature flag server), and Python with `uv`. You use no accounts and no external services. The data is synthetic and deterministic: every query returns exactly what the guide shows.
- 64
- lessons
- 8
- modules
- English · Spanish
- available in
- Free
- access
Outcomes
What you'll be able to do
- Write a tracking plan that starts from product decisions and keep it as reviewable code, with an owner, a trigger, and a source for each event
- Name events and properties with a stable convention, define the envelope (`event_id`, three timestamps, schema version), and validate every incoming event with JSON Schema, quarantining what fails
- Join anonymous visits and identified users in SQL, handle multiple devices and shared devices, separate user from account, and truly delete a person
- Compute in SQL ordered funnels with a conversion window, segments, time between steps, and cohort retention tables, avoiding the time zone and incomplete week traps
- Use OpenFeature with flagd: evaluation context, `targetingKey`, fractional splits, rules, defaults, reasons, hooks, and tests with `InMemoryProvider`
- Log experiment exposure at the right point, keep the first one, analyze only exposed users, and detect sample ratio mismatch and contamination
- Measure and fix data quality: duplicates, lost events, bots, late events, and skewed clocks, with data tests and volume monitoring
- Decide whether to record sessions, what to mask, how long to keep them, and what it costs, with rrweb actually running
Before you start
What you need to bring
It's for you if...
- Full-stack, backend, or product engineers who must answer "how many activate?" or "did the experiment work?" with data they emit themselves
- Engineers who inherited messy tracking and want to make it trustworthy
- People coming from product or data who want to understand why their numbers don't add up
Requirements and materials
- Basic SQL: `SELECT`, `WHERE`, `JOIN`, `GROUP BY`. The rest (CTEs, window functions, `LATERAL`, JSONB, `generate_series`) is explained in the guide
- Intermediate Python: functions, dictionaries, `dataclass`, running a module with `python -m`
- Docker with Compose v2 and `uv` installed; Node.js 22.22 or later (or 24) for the session replay module
- Recommended: knowing what a conversion rate and a control group are (the Product Metrics and Experimentation guide covers them in depth)
Content
The syllabus, module by module
Open any of them to see its lessons.
- 1. Introduction: the format of every entry
- 2. The naming convention
- 3. Typed properties
- 4. The envelope: `event_id`, the three timestamps, and the schema version
- 5. The events table in Postgres
- 6. Validate at the door with JSON Schema and quarantine
- 7. Evolving the schema without breaking history
- 8. Project: the Turnito collector and the first load
- 1. Introduction: who is who?
- 2. The `anonymous_id`
- 3. The identify moment
- 4. Stitching in SQL
- 5. Hard cases: several devices, a shared device, logout
- 6. User and account: the business as the unit of analysis
- 7. Identity and privacy: hashing is not anonymizing, and deleting a user
- 8. Project: attribute each signup to its arrival channel
- 1. Introduction: two questions, two queries
- 2. The naive funnel and why it lies
- 3. The ordered funnel with a conversion window
- 4. Segmenting the funnel and measuring time between steps
- 5. Defining "active" and building cohorts
- 6. The retention table with `generate_series`
- 7. Retention SQL traps
- 8. Project: Turnito's activation and retention report
- 1. Introduction: the sealed orders
- 2. What OpenFeature is: API, provider, context, and hooks
- 3. flagd in Docker and the first evaluation
- 4. Targeting: `targetingKey`, fractional splits, and rules
- 5. Defaults, errors, and reasons of an evaluation
- 6. Hooks: observing every evaluation
- 7. Testing code with flags: `InMemoryProvider`
- 8. Project: the onboarding checklist flag
- 1. Introduction: "did the checklist work?"
- 2. Evaluating is not exposing
- 3. The exposure event and where it is emitted
- 4. First exposure and deduplication
- 5. Analyze only the exposed, with the outcome after the exposure
- 6. Sample ratio mismatch: detect it and find the cause
- 7. Contamination: users in two variants and mid-test changes
- 8. Project: the checklist experiment analysis
- 1. Introduction: what validates isn't always true
- 2. Duplicates: retries and double taps
- 3. Lost events: blockers and reconciling client against server
- 4. Bots and traffic that isn't people
- 5. Time: late events and clocks that run ahead
- 6. Data tests and volume monitoring
- 7. What changes when you clean: the funnel and the experiment again
- 8. Project: Turnito's data quality report
Common questions
What people usually ask
No limit. It's a free guide: come in whenever you like, as often as you like.
No. Modules run from easier to harder, but you can jump to the one you need. Progress is saved per lesson.
Whatever is needed is listed under “What you need to bring”, above. If nothing is listed there, you can start from zero.
In the WhatsApp group, and every two weeks there's a live with an instructor where questions get worked through.
Start whenever you like
What students say
These reviews are from enrolled students who completed at least 50% of the course. We moderate reviews only on content grounds (spam, offensive language, personal data), never for being critical or negative.
No approved reviews yet.
Be the first to share your experience!