AI Hints
Home›Data Science Tutorial›Time and Journeys
Data Science · Lesson 35 of 101

Funnels

Where do customers drop out?.

⏱ 2 min read▶ Video at 1:01:09🎓 Free
Watch this lesson in the Data Science courseWatch on YouTube ↗Full Data Science course

Fifty thousand people open the Harbor Coffee app each month. Only six and a half thousand pay for something. Where did all the others go? A funnel shows you each step of the journey, and exactly where people leave.

Funnels
From the video: Funnels
  • Fifty thousand open the app
  • Six and a half thousand pay
  • Where did the others go?

Reading a funnel

Here are the four steps. For each one, we work out what share of the previous step made it, and what share of the start. Run it. Look at the first new column. Sixty two percent view the menu. Then only thirty percent add something to their cart. And seventy percent of those pay. Adding to the cart is clearly the weakest step. Then we ask a fun question. What if we improved each step by ten percent? Run it. They all give exactly the same result, seven thousand one hundred and fifty payers. That's a real insight. Steps multiply together, so a ten percent lift is worth the same anywhere. So don't chase the biggest drop. Chase the step that's easiest to improve.

funnel.pypython
import pandas as pd

steps = pd.DataFrame({"step": ["Opened app", "Viewed menu", "Added to cart", "Paid"],
                      "users": [50000, 31000, 9300, 6500]})

steps["of_previous"] = (steps["users"] / steps["users"].shift(1)).round(2)
steps["of_start"] = (steps["users"] / steps["users"].iloc[0]).round(2)
print(steps.to_string(index=False))

for improved in ["Viewed menu", "Added to cart", "Paid"]:
    rates = (steps["users"] / steps["users"].shift(1)).fillna(1).copy()
    i = steps.index[steps["step"] == improved][0]
    rates[i] = min(rates[i] * 1.10, 1)
    print(f"Lift {improved:<14} by 10%: {50000 * rates.prod():,.0f} payers")
Output
         step  users  of_previous  of_start
   Opened app  50000          NaN      1.00
  Viewed menu  31000         0.62      0.62
Added to cart   9300         0.30      0.19
         Paid   6500         0.70      0.13
Lift Viewed menu    by 10%: 7,150 payers
Lift Added to cart  by 10%: 7,150 payers
Lift Paid           by 10%: 7,150 payers

Funnel mistakes

Be careful with funnels. Decide on a time window, because someone who pays three weeks later might still count. Remember that people can skip steps, or go backwards. Compare funnels across segments, as an average may hide a phone that's broken. And a drop tells you where people leave, not why. For that, you need to talk to them.

Set a time windowhow long do they have?
Segment ita broken device hides here
Where, not whytalk to users
Fix what's easieststeps multiply

Summary

Funnels show you where people leave, and steps multiply. But do the customers who stay, keep staying? Next, retention.

Key takeaways
  • Show each step's conversion
  • Steps multiply
  • Funnels show where, not why
Next up: Retention Curves — the shape of a healthy business