What is cohort analysis? Definition and ecommerce example
Cohort analysis groups customers who share a characteristic, such as the month they were acquired or first bought, and tracks how each group behaves over time. It shows retention and repeat-purchase patterns that a single store-wide average hides.
How it works
A cohort analysis has two parts: an inclusion rule that puts a customer into a cohort (for example, first purchase in January) and a return rule that measures what they do later (for example, placed another order). Results are usually shown as a table: one row per cohort, one column per period since the cohort started (week 1, month 1, month 2 and so on).
Google Analytics 4 has a built-in cohort exploration that works this way. You can build cohorts from a user's acquisition date, an event, a transaction or a conversion, and view them at daily, weekly or monthly granularity. GA4 notes that its cohorts are based on device data, not User-ID, so the same person on two devices can appear twice.
A worked example
Hypothetical example: a store compares customers who first bought in January with those who first bought in March, when it ran a large discount.
| Cohort | New customers | Ordered again within 3 months |
|---|---|---|
| January | 500 | 100 (20%) |
| March (sale) | 1,000 | 100 (10%) |
The sale doubled new customers, but each one was half as likely to return. A blended average across both months would show about 13% repeat purchase and hide the difference.
Why it matters for an online store
- Retention. It shows whether customers acquired recently stick around better or worse than earlier ones.
- Channel and campaign quality. Cohorts by acquisition source or promotion reveal which ones bring customers who come back.
- Better forecasts. Repeat-purchase curves per cohort feed more realistic customer lifetime value estimates.
Common mistakes
- Comparing cohorts of very different sizes or at different ages (a two-month-old cohort cannot be compared with a year-old one on 12-month retention).
- Ignoring seasonality: a holiday cohort often behaves differently from a spring one.
- Stopping at the table. Pair it with RFM segmentation to decide what to do for each group.