Reconcile stage populations and time windows before publishing conversion rates or drop-off shapes.
Funnel charts: hold the cohort still before calculating conversion
A funnel is a population claim
Each stage should represent the same entrants moving through a declared sequence within a stated observation window. Counting every visit at stage one and only new users at stage two mixes populations. Define entrant ID, entry date, stage completion event and maximum allowed delay. Then count unique entrants reaching each stage. Grain and denominator rules make rates reproducible. Keep re-entries and repeated events explicit, since deduplication changes every step.
Distinguish step and overall rates
A step conversion divides the current stage count by the immediately previous count. An overall conversion divides by the entry count. If 470 entrants reach review and 188 reach approval out of 810 starts, approval's step rate is 188/470 or 40 percent; overall approval is 188/810 or about 23.2 percent. Both are useful, but a chart with unlabeled percentages is ambiguous. Show count and denominator beside each rate. Composition charts face the same denominator trap.
Late arrivals can make a false drop
A current-week cohort has had less time to reach later stages than an older cohort. Wait until the conversion window has matured or mark rates provisional with a maturity cutoff. Do not compare a mature 29-day cohort with one observed for two days. Provisional-period labels make this visible. If stages can be skipped or revisited, a strict funnel loses information; use a transition or flow view instead. Flow conservation applies when exits and skips matter.
Audit monotonicity
For a strict cohort funnel, counts cannot rise as stages advance. An increase signals duplicate counting, a changed filter, late data or a non-strict process. Do not clamp bars to make the chart look right. Inspect raw identities and stage timestamps. Segment filters should use a stable entry-time property; filtering later by a property acquired after conversion can bias the chart toward successful entrants. Linked filters must preserve the entry cohort. Export stage order, window, counts and both rate definitions.
Worked contract
def strict_funnel(stage_members: list[tuple[str, set[str]]]
) -> list[tuple[str, int, float | None, float | None]]:
if not stage_members or len({name for name, _ in stage_members}) != len(stage_members):
raise ValueError("stages must be named and unique")
entrants = stage_members[0][1]
previous = entrants
result = []
for stage_name, members in stage_members:
if not members <= previous:
raise ValueError("stage contains non-eligible entrants")
result.append((stage_name, len(members),
len(members) / len(previous) if previous else None,
len(members) / len(entrants) if entrants else None))
previous = members
return result
stages = [("start", {"u47", "u59", "u71", "u83"}),
("review", {"u47", "u59", "u71"}),
("approve", {"u47", "u71"})]
funnel = strict_funnel(stages)
assert funnel[-1] == ("approve", 2, 2 / 3, 2 / 4)Performance and operating cost
For S stages and total M stored membership IDs, subset checks and counts use O(M) expected time with hash sets and O(S) output space beyond the supplied sets. Persisting full ID sets can be costly; a warehouse may compute stage membership with distinct keys and checked joins. The example assumes a strict nested sequence and says nothing about timestamps or cohort maturity; enforce those earlier in the data pipeline.
Common Mistakes
- Mixing sessions at one stage with unique people at another.
- Using a previous-stage denominator while labeling it overall conversion.
- Comparing mature and immature cohorts without a cutoff.
- Forcing increasing counts down to the prior stage instead of fixing the event model.
Validation drill
Build a three-stage funnel for 810 entrants with a 29-day window. Report step and overall rates, then inject a skipped-stage user and explain why strict validation rejects that path.
Read next
- Aggregation grain and denominator: make every plotted mark auditable
- Stacked bars: separate composition from volume and preserve denominators
- Sankey diagrams: reconcile flows before sizing links
- Interactive dashboards: recompute cohorts after linked filters
