Product analytics: funnels, cohorts and instrumentation
Decide which events to record before you build, define a funnel and a cohort so that two people get the same number, and settle which definition of activation the company uses
Monthly active buyers at a marketplace rose from 29,000 in September to 38,000 in October. What can you conclude about retention?
Product analytics answers questions about behaviour from the events your product records: what people did, in what order, how many came back. It sits underneath Metrics and experiments: a metrics tree is a diagram until each box is a query over real events. It also sits underneath the PRD, whose success-metrics table promises numbers the product must be able to produce on launch day.
Three objects carry most of the work. An event is a record that something happened. A funnel is an ordered set of events with a conversion rate between them. A cohort is a group of people who share a starting point, followed over time. Instrumentation is the work of making sure the first three are true, and most analytics problems that look like analysis problems are instrumentation problems nobody wrote down.
The model: events, identities and properties
An event has four parts. The identity says who did it. The name says what they did. The timestamp says when. The properties carry the context: the amount, the city, the platform, the experiment arm. Everything else, funnels, cohorts, retention, is computed from rows of that shape.
Each part has a way of going wrong.
Names drift. One team fires checkout_start, another CheckoutStarted, a third began_checkout, and a funnel built on one silently misses the others. Pick a convention and keep it. The common one, which Segment’s tracking-plan guidance in the reading calls object plus action, is a noun and a past-tense verb: order_placed, address_confirmed. The tense and case matter less than that everyone uses the same ones.
Identity splits. A shopper browses logged out on a phone, signs in, then buys on a laptop. Three identifiers, one person. A funnel that counts devices reports three people and a conversion rate that is wrong by a factor you cannot see. Write down the identity rule: which identifier is the key, when an anonymous identifier is merged into a signed-in one, and what you do about shared devices. For a marketplace, also decide whether the unit is the buyer, the account or the household.
Timestamps lie. The device clock can be wrong, and a phone that was offline sends its events hours late. Record both when it happened and when it arrived, and decide which one your funnels use.
Duplicates and losses. Events travel over networks that retry, and a retry can deliver one event twice. Give every event a stable identifier, and deduplicate on it when you load it. The same reasoning as in the idempotency lesson applies: at-least-once delivery plus a handler that ignores repeats is as good as it gets, and the dedupe key is the part analytics teams forget. Losses are quieter. Ad blockers and crashes remove client events, and you never see the gap.
Properties rot. A property that holds an amount in naira in one release and kobo in the next is two properties wearing one name. Store money as an integer in the minor unit, with the currency, as the minor units lesson argues. Type every property and list the allowed values for any that is a category, such as platform being one of android, ios or web.
Client or server
The question to ask of every event is whether the thing it records is something the user did on a screen, or something the system did. Screen views, taps and form interactions are client events: only the app knows them. Orders, payments, deliveries and refunds are server events, fired by the service that made the state change. The server knows what happened; the client only knows what the user saw.
For Ojaline, where card payments are authorised at checkout and captured on dispatch, this gives a clean rule. payment_authorised and order_dispatched come from the services that own them. card_submitted comes from the app, because only the app knows the buyer pressed the button. A funnel whose money step comes from the app is wrong.
The tracking plan: instrumentation as a written decision
A tracking plan (also called an instrumentation spec or an event dictionary) is the document that says which events exist, what fires them and what they carry. It is the analytics counterpart of a PRD’s requirements section, and it fails the same way: when it is not written, each engineer decides for themselves, and the dashboard becomes a record of those private decisions.
For every event the plan holds:
| Field | What it says | Example |
|---|---|---|
| Name | Object plus past-tense action | payment_authorised |
| Question | The decision it exists to inform | Where do buyers who reach payment leave? |
| Trigger | The exact moment it fires | When the payment service receives the authorisation approval, once per attempt |
| Source | Client or server, and which service | Server, payment service |
| Properties | Name, type, allowed values, example | amount_minor integer, kobo; attempt_number integer |
| Dedupe key | What makes two copies the same event | checkout_id plus attempt_number |
| Owner | The person who answers when it breaks | the payments engineer on call for the checkout team |
| Personal data | Which properties identify a person, and why they are collected | buyer_id is a pseudonymous identifier, needed to join across sessions |
The trigger row is the one that matters most and the one most often vague. “When the user checks out” is not a trigger. “When the server creates the order draft from the cart, before any payment step, once per draft” is.
Instrument questions, not everything
Practitioners disagree on how much to record. One school says to record everything automatically: tools that capture every click and page view without code, so that any question can be asked later without a release. The other says to curate a plan: fewer events, each named and owned, because a pile of auto-captured clicks is hard to turn into a funnel that survives a redesign, and every recorded property is data you must secure. Auto-capture suits a small team that does not yet know its questions. A curated plan suits a product with money in it. Most mature teams do both.
Whichever you choose, start from the question. “We should track the checkout” produces thirty events and no answers. “We want to know which step loses the most buyers who have already entered a delivery address” produces five, each of which can be used.
Instrumentation belongs in the PRD
Add instrumentation to the PRD as a MUST: “The events in the attached tracking plan fire correctly in the first release, verified before launch.” Otherwise it becomes a follow-up ticket that slides; Working with engineering covers why work outside the definition of done gets cut. Verify with the same habit the metrics chapter describes for experiments: fire each event on a test account, look at the row that arrives, check its properties, and run an A/A comparison before you trust a new measurement.
Treat the plan as a privacy document too. An event stream tied to a buyer identifier is personal data, and in Nigeria that puts it under the Nigeria Data Protection Act 2023 (Act No. 37, Official Gazette, 1 July 2023), which regulates the processing of personal data about identifiable individualsas of 2026-11. Do not record what the question does not need, never put card numbers or free-text fields in properties, and agree retention with whoever owns data protection at the company before launch.
Funnels
A funnel counts how many people who did one thing went on to do the next, in order, within a time limit. A funnel without a written definition is the commonest source of two numbers for one thing.
Every funnel needs five decisions:
- Entry event. The first step, and the population it defines.
- Steps. The ordered events after it.
- Unit. What is counted: users, sessions, checkouts or orders. A buyer who tries three times is one user and three checkouts.
- Window. How long a person has to get from the entry to the last step, such as 24 hours. Without one, a funnel counts a buyer who returned a month later as converted.
- Order. Strict, where the steps must happen in sequence, or loose, where each only has to happen after entry. Strict is usually right for a flow, and loose for exploring.
Here is a checkout funnel for ten thousand product-page sessions (illustrative numbers):
| Step | Sessions | Conversion from previous | Overall |
|---|---|---|---|
| Product viewed | 10,000 | 100% | |
| Added to cart | 2,800 | 28% | 28% |
| Checkout started | 1,400 | 50% | 14% |
| Payment authorised | 1,050 | 75% | 10.5% |
Read it carefully. The largest relative drop is cart to checkout, at 50%. The largest absolute loss is the first step, 7,200 sessions. And the most fixable loss might be the last one, 350 buyers who got as far as paying, which is smaller but closest to revenue. A funnel says where to look, not where to work.
Mix shift and the aggregate
A funnel across every buyer averages populations that behave differently. Suppose mobile sessions are 6,000 of the 10,000 and convert to authorised payment at 9.0% (540), while the 4,000 desktop sessions convert at 12.75% (510). Together that is the 10.5% above. Let the mobile share rise to 70% with no change in either device’s conversion. The blended rate becomes 0.7 × 9.0 + 0.3 × 12.75 = 10.125%. The headline fell by 0.375 of a point and nothing in the product changed. Cut a funnel by platform, city and new versus returning buyer before you read a movement as an effect.
The last step is not the outcome
For a marketplace, “payment authorised” is not “order completed”. Ojaline captures the payment when the order is dispatched, so an authorised order that is cancelled or never leaves the warehouse is not revenue. A funnel that ends at authorisation overstates completed purchases, and one that adds order_dispatched within seven days as a final, lagging step shows the gap. Put the step that matches the outcome you promised in the PRD at the end.
Cohorts and retention
A funnel looks at one pass through a flow. A cohort looks at a group of people over time. The standard version is an acquisition cohort: everyone whose first order fell in a given month, followed for the months after.
Here is the table that explains the Predict question (illustrative numbers). Each row is a cohort of buyers by month of first order, and the cells show the share who ordered again in the nth month after.
| First-order month | Buyers | Month +1 | Month +2 |
|---|---|---|---|
| August | 10,000 | 30% | 24% |
| September | 14,000 | 26% | |
| October | 20,000 | 22% |
Now count active buyers, those who ordered in the month. Assume 12,000 older buyers order in both months. September has 14,000 new buyers, 3,000 from August (30% of 10,000), and the 12,000: 29,000. October has 20,000 new buyers, 3,640 from September (26% of 14,000), 2,400 from August (24% of 10,000), and the 12,000: 38,040. Active buyers rose 31% while each new cohort came back less often than the one before: 30%, then 26%, then 22%. The active-user line says growth. The cohort rows say the product is getting worse at keeping the buyers it acquires, and an acquisition push is hiding it.
Say which retention you mean. N-day retention counts the share who return on exactly day N. Bracket retention counts return at any point inside a window you choose. Unbounded retention counts return on day N or at any later time. These are the names Amplitude’s retention charts use (its current documentation labels them Return On, Return On (Custom) and Return On or After). All three are legitimate and give different numbers, so say which one a dashboard uses. For occasional buying, a monthly bracket is more honest than a day-7 figure.
Read the shape, not one cell. A curve that falls and then flattens means a group of buyers has found lasting value. One that keeps falling towards zero means nobody has.
Behavioural cohorts are suggestions, not proof. You can define a cohort by what people did, such as buyers who used search in their first week, and compare its retention with those who did not. If the search users retain better, you have a candidate, not a cause: people who search may be the keen ones to begin with. The route from “correlates with retention” to “causes it” is an experiment, which Metrics and experiments covers.
Activation: a definition is a decision
Activation is the point at which a new user has had enough of the product’s value to be likely to stay. It is the most argued-over definition in product analytics, because it is the number a growth team is judged on, and it is a choice, not a measurement.
A usable activation definition has the same parts as a funnel: an entry (sign-up), a qualifying event, a window and a unit. It also has to pass four tests:
- It predicts retention. Buyers who meet it must come back measurably more often than buyers who do not, in your own cohorts.
- It is early. You can read it in days, not months, or it cannot steer a quarter.
- A team can move it. If it depends on something outside the product team’s reach, it is a poor target for that team, even if it is a good indicator.
- It is understandable. Someone in finance can say in one sentence what it counts.
Croll and Yoskovitz’s Lean Analytics, in the reading, ties the metric you focus on to your business model and stage, and argues for one number at a time. Where the two definitions in the Why disagree, neither is wrong in the abstract. Placed orders are early and controllable. Delivered, kept orders are closer to value and depend on a delivery fleet in nine cities. Test both against whether the buyer comes back; the Decide works through it.
Keeping the numbers true
Analytics fails quietly. The dashboard does not go red when an event stops firing; it shows a lower number, and someone explains it with a story. The defence is a few checks that do not depend on anyone noticing.
| Failure | What it looks like | Check |
|---|---|---|
| Event stops after a release | One step’s volume drops to near zero the day an app version ships | Alert when daily volume falls well below the same weekday’s recent median (a rule of thumb is 30% below) |
| Duplicates | A step has more users than the step before it | Count distinct dedupe keys; fail the load if repeats exceed a small threshold |
| Source disagreement | Events say 28,000 orders, the orders table says 27,100 | Reconcile counts against the system of record daily, as in the reconciliation lesson, and investigate any gap above an agreed tolerance |
| Definition drift | Same name, new meaning after a refactor | Change the meaning, change the name; version the plan |
| Late events | Yesterday’s number rises over the next day | State the freeze time for each report, and say which reports are provisional |
Event data usually lands in a columnar store (columnar and analytics), and funnel and cohort queries use the windowing in aggregation, windows and CTEs. You need to read the query behind your funnel and know whether it counts users or events. Pair it with Discovery and user research: the funnel finds the step where buyers leave, and the conversation finds the reason.
Where practitioners disagree
Self-serve or analyst-led. Some teams give every PM raw events; others route questions through analysts to keep definitions consistent. Self-serve is faster and produces more conflicting numbers. The usual compromise is governed, owned metrics for anything in a review, and open exploration for the rest.
How far to trust a funnel. Funnels are descriptive; teams that treat them as causal chase symptoms, and teams that distrust them test everything. Use funnels and cohorts to find where to look, and an experiment to decide whether a change helped.
Day to day
Before a build, one conversation. When a PRD is drafted, you, the engineering lead and an analyst spend thirty minutes on the tracking plan: the questions, the events, the triggers, the sources, the owners. You write the plan, they correct it. Fixing an event in the plan costs a sentence; after launch it costs a release and a gap in the data.
During the build, weekly. Instrumentation sits on the same board as the feature. When an engineer changes a flow, the plan changes with it. In week two or three, events are fired on a test account and checked row by row.
At launch, the first day. You check that every event in the plan is arriving, in each experiment arm, at about the volume you expected. If a step has no events by the afternoon, that is an incident. Do it before you read any result.
Every week, thirty minutes: the metrics review. You look at the funnel and cohort views for your area with the team, and read the data-quality alerts first. The question is not what moved, but whether you believe it. Most weeks, nothing needs action.
Every month, an hour: the cohort read. You look at the retention table for recent cohorts. The question is whether newer cohorts retain better or worse than older ones, and which segment is driving it.
Every quarter, half a day: audit the plan. Remove events nobody queries, re-check definitions, and re-test that your activation definition still predicts retention.
This costs two to four hours a week; writing the plan for one flow takes half a day to a day.
There is no analyst and no warehouse, and an off-the-shelf analytics tool does the job. Write the tracking plan as a one-page table and keep it in the repository next to the code, because the engineer who fires an event is the person who will read it. Pick five events that answer your one biggest question and one activation definition, and write the definition in a sentence. With few users, cohort tables are noisy; read them as stories, not statistics. Do not instrument everything. Do instrument anything that touches money from the server.
An analyst or two arrive, and the first fight is over definitions, because three teams have built three funnels. Appoint an owner for each metric that goes into the weekly review, write its spec, and put the tracking plan under review like code. This is the moment for a governed set of core events, a place where activation is defined once, and data-quality alerts on the critical flow. Self-serve access is still valuable and still produces conflicting numbers, so label which dashboards are governed.
A data platform team owns the pipeline, the warehouse and a metrics layer, and your problem is influence, not tooling. Event schemas may need a review board, changes may take a release train, and privacy and legal sign off on any new personal data. Learn how to propose an event, who approves it and how long it takes. Expect your area’s definitions to be inherited from a company-wide set, and to spend effort arguing for a segment-specific one when the shared definition hides what your users do.
Template
# Instrumentation spec: <flow>
Author · Date · Reviewed with: <engineering lead>, <analyst>
PRD: <link>
## Decisions this data informs
1. <question that changes what we build or fix>
2. <question>
## Funnel
**Entry event:** <event> **Unit:** <user | session | checkout | order>
**Steps (in order):** <event> -> <event> -> <event>
**Window:** <e.g. 24 hours from entry> **Order:** <strict | loose>
**Outcome step (lagging):** <event that matches the PRD outcome>, within <days>
**Exclusions:** <staff, test accounts, bots> **Cut by:** <platform, city, new vs returning>
## Identity
Key: <identifier>. Anonymous merges into signed-in when <rule>. Unit of person: <buyer | account | household>.
## Events
| Name | Decision served | Trigger (exact moment) | Source | Properties (type, values) | Dedupe key | Owner | Personal data |
|---|---|---|---|---|---|---|---|
## Cohort
Starts when: <event>. Returns when: <event>. Period: <week | month>. Type: <N-day | bracket | unbounded>.
## Data-quality checks
| Check | Threshold | Alert goes to |
|---|---|---|
## Next audit
<date>: remove events nobody queries, re-test the definitions.
## Open questions
| # | Question | Owner | By |
|---|---|---|---| WORKED EXAMPLE
Ojaline is an online marketplace with its own delivery fleet and a seller wallet, 1,400 staff, about 150 services and 300 engineers, delivering in nine cities. Iyinoluwa, the buyer-side product manager, wrote this spec for the card checkout flow, and Ogheneruona, the analyst, reviewed it. All numbers are illustrative.
Decisions. Which checkout step loses the most buyers who have entered an address, and how many authorised payments end as dispatched orders?
Funnel. Entry: checkout_started. Unit: checkout. Steps, strict order: address_confirmed, card_submitted, payment_authorised. Window: 24 hours. Outcome step: order_dispatched within 7 days. Exclusions: staff accounts. Cut by platform and delivery city. The Pay in four path is a separate spec.
Events. checkout_started: server, when the order draft is created from the cart, once per draft. address_confirmed, card_submitted: app, when the buyer presses the button, dedupe key checkout_id plus event name. payment_authorised: payment service, once per attempt, dedupe key checkout_id plus attempt_number, amount_minor in kobo. order_dispatched: warehouse service, when the dispatch scan is recorded (capture follows), once per order, dedupe key order_id. Owners: Iyinoluwa for the three app and checkout events, the payments engineer for payment_authorised, the warehouse engineer for order_dispatched. Each event serves the decision above. No card data in any property; buyer_id is pseudonymous, needed to join sessions, and is the only personal-data property. Identity: buyer_id once signed in; the anonymous device id merges into it at sign-in; the person is the buyer, not the household.
Result over 28 days. 52,000 started, 41,600 confirmed an address (80%), 33,280 submitted a card (80%), 28,288 were authorised (85%, 54.4% overall), and 26,300 were dispatched within seven days (93.0% of authorised, 50.6% overall). The biggest loss is the address step, 10,400 checkouts. The 1,988 authorised but not dispatched is a separate problem for operations.
Audit. Next on 15 March: drop events nobody queried and re-test the definitions.
Cohort. Starts at first order_dispatched; returns at any later dispatched order; monthly; bracket retention.
Checks. Daily payment_authorised count against the payments table, tolerance 0.5%, alert to the payments engineer. checkout_started below 70% of the same weekday’s four-week median, alert to Iyinoluwa.
Now you
You are the product manager for seller onboarding at Ojaline. Sellers sign up, list a first product, receive a first order, and are paid out of the seller wallet, with wallet balances paid out nightly by NIP. Leadership wants a seller activation number by the end of the month, and the only data is a sign-up event that the app fires twice when a seller verifies by phone and then by email, and a payout event the wallet service fires in the nightly payout run after the order is delivered. Last month’s report counted 4,100 sign-ups, but the sellers table has 3,300. The seller support team defines an activated seller as one who has listed three products. Write the instrumentation spec and the seller funnel: events with triggers and sources, the window (and why it must allow for the nightly payout), the identity and dedupe rules for sign-up, and the checks that would have caught the 4,100.
Self-check
At Ojaline's weekly review, Iyinoluwa, the buyer-side product manager, reports buyer activation at 38%: a first order placed within seven days of sign-up. The operations pack built by Ogheneruona, the analyst, says 29%: a first order delivered and kept within fourteen days. Each number is correctly computed from last month's sign-ups. The quarterly target is not yet set, and the head of product wants one definition by Friday. Ogheneruona can run last quarter's sign-up cohorts through both definitions in an afternoon. Which definition wins?
- HANDBOOK The North Star Playbook John Cutler and Amplitude
How to choose a north star and the input metrics beneath it, which is the tree your funnels and cohorts are measuring. Read the chapters on defining the metric and its inputs before you write an activation definition.
- BOOK Lean Analytics Alistair Croll and Benjamin Yoskovitz
Ties which metric to focus on to your business model and stage, and argues for one at a time. Useful when you need to say why activation, not sign-ups, is the number to watch right now. Read: The chapters on the One Metric That Matters and on the business-model archetypes, including marketplaces.
- DOC Tracking plan best practices Twilio Segment
A vendor's own guidance on naming events as object plus action, keeping to one convention, putting variable detail in properties and limiting the plan to a few core events. Read it for the naming rules and the case for a written tracking plan; ignore the product-specific setup.
- DOC Naming conventions for clean data Segment Academy
A short lesson that recommends the object-action framework for event names from day one. Read it with the tracking-plan page above for how a consistent vocabulary keeps funnels clean.
- BOOK Trustworthy Online Controlled Experiments Ron Kohavi, Diane Tang, Ya Xu, 2020
The route from a correlation in a cohort table to a cause: run the experiment. Read the data-quality material to learn what the checks in this chapter are protecting you from. Read: Chapter 3 on Twyman's law and experimentation trustworthiness, and the chapter on instrumentation.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.