Sub topic 13
Measuring Onboarding with a Funnel
This chapter assumes you can read basic TypeScript, know what a product analytics event is (a record such as { userId, step, timestamp } sent when something happens), and have already defined an activation goal for your app. Here you will turn that goal into a funnel and learn to read it.
What a funnel measures
A funnel is an ordered list of steps that users take toward a goal. For each step you count how many users reached it. The drop between two steps shows where people leave.
For onboarding, the funnel usually starts at first open or sign-up and ends at activation, which is the first-value moment you defined earlier. Everything between them is a step you can measure.
A funnel answers one question well: where do users leave? It does not say why. A 40% drop at the "connect account" step tells you where to look. It does not tell you whether the copy is unclear, the permission prompt is scary, or the integration is broken.
In this example the largest single drop is between "Profile done" and "Connected account" (62% to 31%). That is the first place to investigate.
Choosing funnel steps
Good funnel steps share four properties:
- Each step is a user action, not a screen view. "Saw the connect screen" says little. "Connected an account" says a lot.
- Steps are in the order most users take them. If your flow lets users skip or reorder, decide how to treat that (see below).
- The last step is activation, not "finished the tour." Completing a tour is a vanity milestone if it does not lead to value.
- There are few steps, usually four to eight. Too many steps hide the real problem in noise.
Name events consistently, for example signup_completed, profile_completed, account_connected, first_project_created. Use a past-tense verb so each event means something happened. Keep the names stable, because renaming an event splits its history in two.
Counting users, not events
The most common funnel error is counting events instead of distinct users. A user who opens the profile screen three times generates three events but is one user. If you count events, a step can show more people than the step before it, which is impossible in a funnel.
The following function builds a set of steps per user, then counts how many users have each step. It is the same idea as the funnel counter in the Topic Spine.
interface FunnelEvent {
userId: string;
step: string;
}
function funnelCounts(
events: FunnelEvent[],
order: string[]
): Record<string, number> {
const stepsByUser = new Map<string, Set<string>>();
for (const e of events) {
if (!stepsByUser.has(e.userId)) stepsByUser.set(e.userId, new Set());
stepsByUser.get(e.userId)!.add(e.step);
}
return Object.fromEntries(
order.map((step) => [
step,
[...stepsByUser.values()].filter((s) => s.has(step)).length,
])
);
}
const events: FunnelEvent[] = [
{ userId: "a", step: "signup" },
{ userId: "a", step: "first_project" },
{ userId: "b", step: "signup" },
];
console.log(funnelCounts(events, ["signup", "first_project"])); // { signup: 2, first_project: 1 }Using a Set per user removes duplicates. The function counts a user at a step if the user has ever done that step.
A stricter version: ordered funnels
The function above is an "open" funnel. A user who did first_project but never logged signup (perhaps because of a tracking gap) is still counted at first_project. That can make a later step larger than an earlier one.
A "strict" funnel counts a user at step N only if they also reached every earlier step. You can enforce this by walking the order and stopping at the first missing step:
interface FunnelEvent {
userId: string;
step: string;
}
function strictFunnelCounts(
events: FunnelEvent[],
order: string[]
): Record<string, number> {
const stepsByUser = new Map<string, Set<string>>();
for (const e of events) {
if (!stepsByUser.has(e.userId)) stepsByUser.set(e.userId, new Set());
stepsByUser.get(e.userId)!.add(e.step);
}
const counts: Record<string, number> = Object.fromEntries(
order.map((step) => [step, 0])
);
for (const steps of stepsByUser.values()) {
for (const step of order) {
if (!steps.has(step)) break;
counts[step] += 1;
}
}
return counts;
}
const sample: FunnelEvent[] = [
{ userId: "a", step: "signup" },
{ userId: "a", step: "first_project" },
{ userId: "b", step: "first_project" }, // missing signup event
];
console.log(strictFunnelCounts(sample, ["signup", "first_project"])); // { signup: 1, first_project: 1 }User b is not counted at all, because they never reached signup. Counts can now only fall as you move down the funnel.
Which version should you use? Use the strict version when the steps are truly sequential. Use the open version when users can complete steps in any order, such as a checklist.
Skipped steps and optional steps
Onboarding often lets users skip steps. A skipped step is not a failure, so do not treat it as a drop-off.
There are two common approaches:
- Remove optional steps from the main funnel. Track them separately as "completed" and "skipped" rates.
- Count a skip as passing the step. Emit a
profile_skippedevent and treat it as equivalent toprofile_completedfor ordering purposes.
Pick one and document it. Mixing the two makes numbers from different weeks impossible to compare.
Conversion rates: two views
You can express each step two ways.
| View | Formula | Use it to |
|---|---|---|
| Overall conversion | users at step ÷ users at the first step | See the total journey. |
| Step conversion | users at step ÷ users at the previous step | Find the weakest single transition. |
From the earlier diagram, "Connected account" has an overall conversion of 31% and a step conversion of 50% (31 ÷ 62). Step conversion is the better tool for finding the problem step. Overall conversion is the better number to report and track over time.
Time windows and cohorts
A funnel needs two time decisions.
First, a conversion window. This is how long a user has to finish the funnel after starting it. A 7-day window is common for apps where users return later. A window that is too short undercounts users who come back the next day. A window that is too long mixes in people who were effectively activated by something else.
Second, a cohort. A cohort is a group of users who started in the same period, such as everyone who signed up in the week of 3 November. Compare cohorts to see trends. If you instead count all events in a calendar week, recent sign-ups look worse than they are, because they have not had time to finish yet.
Segmenting the funnel
An average funnel hides differences. Split it by the segments you defined earlier to see them.
Useful splits for onboarding:
- Platform: iOS, Android, web. A step may work on one and fail on another.
- Acquisition source: paid ad, organic search, invitation. Invited users often convert much better.
- Stated intent: the answer to a setup question, such as "personal" or "team."
- App version: shows whether a release changed the flow.
Watch sample sizes. A segment with 12 users can swing 20 points on one person. Do not act on a split until it has enough users to be stable.
Measuring time and quality, not only conversion
Conversion tells you how many users arrive. Two other measures round out the picture.
- Time to value: the median time from first open to activation. Use the median, not the mean, because a few users who return after weeks pull the mean up.
- Early retention: the share of activated users who return on day 1 or day 7. A flow that pushes users to activate with a trick, but leaves them confused, will show high activation and poor retention.
Together, these three numbers (conversion, time to value, retention) tell you whether a change helped.
Instrumenting events well
Funnel quality depends on event quality. Follow these rules:
- Send the event from the place where the result is certain. Emit
account_connectedafter the server confirms the connection, not when the user taps the button. - Attach the same user identifier before and after sign-up. Without this, anonymous visits and signed-in users appear as different people and the first steps look inflated.
- Include properties you will want to split by, such as
platform,source, andapp_version. - Record the time of each event on the client and server. Offline users send events late, and the order can look wrong without timestamps.
- Test the events before launch. Walk through the flow yourself and confirm every event arrives once.
Common mistakes
- Counting events instead of users, as shown above.
- Making the last step something users can do without being activated, for example "viewed the dashboard."
- Ignoring users who never start. If 30% never pass the welcome screen, the problem may be the app store listing or the first screen, not the steps you track.
- Reading a funnel before the window closes.
- Changing step definitions mid-quarter and then comparing old and new numbers.
- Treating the funnel as proof of cause. A drop shows where, not why. Pair it with session recordings, user interviews, or a short exit survey.
Exercise
A five-step funnel shows 1,000 users at "signup", 600 at "profile", 540 at "connect", 270 at "firstproject", and 220 at "inviteteam". Which transition is the weakest, and what are the overall and step conversion rates for "first_project"? Also, give one reason the numbers might be misleading if the funnel was read three days after a 7-day window began.
Show answer
Step conversion for each transition: signup to profile 60%, profile to connect 90%, connect to firstproject 50%, firstproject to inviteteam about 81%. The weakest is connect to firstproject at 50%. For "first_project", overall conversion is 270 ÷ 1,000 = 27% and step conversion is 270 ÷ 540 = 50%. Reading the funnel three days into a 7-day window may mislead because recent users have not had time to finish, so later steps look lower than they will end up.
Exercise
Your counts show 410 users at "connect" but only 395 at the earlier step "profile." Name two likely causes and one fix for each.
Show answer
One cause is that the funnel counts events instead of distinct users, or counts users who skipped profile. Fix: count distinct users, and treat a skip as passing the step or remove the optional step. Another cause is that the user identifier changes at sign-up, or the profile event is missing for some users because of a tracking gap. Fix: link the anonymous ID to the account ID, and use a strict funnel that only counts users who reached every earlier step.