

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 7
click for more info
Not enough gems
Cost: 6 gems
1: Event Data
incomplete
2: Event Structure
incomplete
3: Event Counting
incomplete
4: Resample
incomplete
5: Resample Aggregations
incomplete
6: Active Users
incomplete
7: Time Patterns
incomplete
8: Funnel Metrics
incomplete
9: Conversion Rates
incomplete
10: Funnel Drop-Offs
incomplete
11: Ordered Funnels
incomplete
12: Cohorts
incomplete
13: Cohort Retention
incomplete
14: Rolling Metrics
incomplete
15: Growth Rates
incomplete
Back
ctrl+,
Next
ctrl+.
This lesson's interactive features are locked, please to keep using them
DAU, WAU, and MAU – daily, weekly, and monthly active users – are the most watched metrics at most product companies. An active user is a unique user who performed at least one "qualifying event" in a time window. These metrics answer the important question: how many people are actually using this thing?
At Boot.dev, we use "lesson submissions" as our "qualifying event." So a "daily active user" is someone who attempted to submit at least one lesson on a given day.
You can count distinct values in each group using nunique(). It ignores duplicates, so repeated values don't inflate the numbers:
unique_devices = events.groupby("event_type")["device_id"].nunique()
This groups events by event_type, then counts how many distinct device_ids appeared in each group. For active-user metrics, the value you count is usually a user ID, and the group is usually a time bucket like a day, week, or month.
DAU/MAU ratio is often used as a product "health check." A ratio above 0.5 means people use your product on most days of the month (like a messaging app). Below 0.1 means it's a monthly-visit product (like a billing portal). Neither is inherently bad – it depends on your product.
SnackStack's product team wants to know how many people actually use the app each day.
Complete the calculate_dau function. It accepts an events DataFrame with timestamp and user_id columns and returns a DataFrame with one row per calendar date: a date column and an active_users count.