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
NIEVA

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.

Common questions

What people usually ask

Start whenever you like

Reviews

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!