Objective & prerequisites
Measure step conversion without counting repeats or out-of-order actions as new users. Prerequisites: percentages, basic tables, Python lists/dictionaries and the earlier analysis foundations. Download and extract the full kit, then open a terminal in product-analytics-kit. Python 3.10+ and the standard library are sufficient. Spreadsheet users can inspect the CSVs and reproduce the small controls manually. All people, events and experiment outcomes are invented teaching data. No live tracking, public experiment, payment or registration is activated. These free companion lessons use the existing studio without changing paid access or course progress.
python3 analysis.py
python3 -m unittest discover -s tests -vUnderstand the concept
A funnel represents a defined sequence. The lab uses strict chronological order: start time < lesson time < exercise time. Exercise must occur no later than first start plus 72 hours; a timestamp exactly at the deadline qualifies. The earliest start anchors one attempt; later starts do not restart the window. These rules are deliberate and may differ from a vendor’s longest-sequence, session or re-entry rules. Count each user once at each reached step. Overall conversion divides final-step users by first-step users. Conditional step conversion divides a step by the previous step. A drop-off indicates where recorded progression stops, not why it stops. Qualitative research and instrumentation review are needed before attributing frustration or lack of interest.
Worked example
Twelve users start; eight reach a later lesson and five reach a later exercise in time. Overall conversion is 5/12 = 41.67%. Start-to-lesson is 8/12 = 66.67%; lesson-to-exercise is 5/8 = 62.50%. Four people stop before a qualifying lesson; three more stop before a qualifying exercise. U03 has an exercise before its lesson and does not finish. U06’s exercise at signup+73 hours is beyond first start+72 hours. U07’s lesson precedes start, and U08 has an exercise without a lesson. Repeated U10 lessons do not add people.
from analysis import read_csv, product_data, funnel
people, events, _ = product_data(read_csv("users.csv"), read_csv("events.csv"))
result = funnel(people, events)
assert result["counts"] == [12, 8, 5]
assert round(result["overall_rate"]*100, 2) == 41.67Try it yourself
List each user’s furthest qualifying step. Explain why a COUNT of exercise rows or an unordered intersection produces a different number. In a copy, move U06’s exercise to exactly its first start+72 hours and rerun. Do not change the production definition merely because a different boundary improves the reported rate. State your denominator, time window and expected result before running the reference. Use a copy for changes and keep the original evidence intact.
Worked solution
The completing users are U01,U02,U04,U05,U09. The intermediate-only users are U03,U06,U10; U07,U08,U11,U12 reach only start. Moving U06 to the inclusive deadline makes final conversion 6/12 = 50%, while first and second steps stay 12 and 8. The original fixture remains 12→8→5. If your business permits repeated attempts, define and test a different metric rather than silently mixing approaches.
Knowledge check
Is 5/8 the overall conversion rate for this funnel?
Check and explain
No. It is the conditional last-step conversion. Overall conversion uses the original entrant denominator: 5/12.
Evidence, mistakes & handover
Keep a metric definition and an auditable count beside every percentage. Distinguish a measured zero, missing telemetry and an incomplete observation window. Record exact commands, actual outputs, assumptions and one failed case. Do not describe an observational association or a manufactured experiment fixture as proof of real business impact. The kit includes separate exercises, worked solutions, a metric contract, an experiment plan template, a decision memo template, tests and a visual worked report. Credit the supplied starting point and explain your own contribution.
Authoritative reference
— reference for the underlying concept; vendor defaults can differ from this lesson’s explicit definitions. Lesson prose, case data and exercises are original. No analytics vendor installation, live user telemetry or production experimentation is claimed.
Try the activity before reading its reference. Keep your sources, commands and assumptions with your work. Companion activities are unsaved self-practice and do not award a certificate or change lesson progress.