Mobile shopping app
Product analytics for a shopping app: users, the events they fire, and two A/B tests. Sign-ups January to April 2025, events to the end of June 2025.
users
One row per user. Key: user_id. 360 rows in the larger version, 140 in the smaller.
| user_id | int | Unique id. |
| signed_up_at | timestamp | Sign-up time (UTC). |
| country | text | Two-letter country code. |
| platform | text | ios, android or web. |
| acquisition_channel | text, nullable | organic, paid, referral or partner. NULL when unknown. |
events
One row per tracked event. Key: event_id. 7,616 rows in the larger version, 3,013 in the smaller.
| event_id | bigint | Unique id. |
| user_id | int | Who fired it. |
| event_name | text | app_open, search, view_item, add_to_cart, begin_checkout, purchase or share. |
| occurred_at | timestamp | When (UTC). |
| session_id | text, nullable | Session the event belongs to. NULL for a few events sent from the background. |
| revenue | numeric(10,2), nullable | Order value for purchase events, NULL otherwise. |
experiment_assignments
Which variant each user saw in each experiment. Key: user_id, experiment. 349 rows in the larger version, 128 in the smaller.
| user_id | int | The user. |
| experiment | text | new_onboarding or one_tap_checkout. |
| variant | text | control or treatment. |
| assigned_at | timestamp | When the user was assigned (UTC). |
Questions on this database
- Purchases after assignment in the one-tap checkout testThe growth team reads out the one_tap_checkout experiment. Everyone assigned to it is in experiment_assignments with their variant and assigned_at time.
- Running count of distinct buyers by first purchase monthThe growth team charts how many different people have ever bought in the app. A user is a buyer once they have at least one purchase event.
- Events in the 10 minutes before each purchaseProduct wants to know how busy a user was just before buying.
- Buyers whose latest purchase beat their earlier averageThe growth team wants to find shoppers who are spending more over time. Use events rows with event_name = 'purchase' and a non-NULL revenue.
- Share of users who purchased, by platformThe product team wants to know what share of users have ever bought something in the app.
- Share of sessions with a search, by platformProduct wants to know how often a visit to the app includes a search. A session is one distinct session_id, and every session belongs to a single user.
- Repeat cart adders who never boughtLifecycle marketing wants to message users who keep putting items in their cart but never check out.
- Active users in the 30 days before a dateThe product team reports thirty-day active users per platform, measured as of 2025-06-01.
- Weekend vs weekday revenue per calendar dayThe shopping app team wants to know whether weekends earn more than weekdays in May 2025.
- Users whose carts turn into purchases within 30 minutesThe checkout team wants to find users who buy quickly after adding something to their cart.
- Events fired twice within ten secondsThe app sometimes sends the same event twice when a button is tapped quickly. The analytics team wants to know how many events to drop.
- Keep the first purchase event for each web userGrowth wants one row per user for their first purchase, to build a "first order" table. Use only users whose platform is web.
- Week-two retention by acquisition channelMarketing wants to compare how well each acquisition channel keeps its users in their second week.
- Day 1 and day 7 retention by sign-up monthProduct reports classic "day 1" and "day 7" retention for each sign-up month.
- Retention table for months 0 to 3The growth team wants the raw numbers behind a retention triangle, in long format: one row per sign-up cohort and month number.
- Month-one retention by sign-up cohortProduct wants month-one retention for each sign-up cohort. A user's cohort is the calendar month they signed up (users.signed_up_at).
- Conversion between each funnel stepThe shopping app has a four step funnel, in this order.
- Median hours from sign-up to first purchaseGrowth wants to know how long new users take to buy for the first time, by platform.
- Ordered purchase funnel by platformBuild a purchase funnel for each platform where every step has to happen after the step before it.
- Purchase funnel by experiment variantThe team tested a new onboarding flow (new_onboarding in experiment_assignments).
- Purchase funnel inside a single sessionThe product team wants a session-level funnel: how many browsing sessions turn into a purchase without the user leaving the session.
- Streaks of four or more days of opening the appThe engagement team wants to find habit-forming users. A user has an app-open day when they fire at least one app_open event on that UTC calendar day.
- Purchase value spread (interquartile range) by platformThe pricing team wants to see how spread out order values are on each platform, without letting a few giant orders distort the picture.
- Browse-only sessions by platformThe product team wants to know on which platforms people browse without adding anything to the cart.