- A cohort analysis groups customers by the month of their first order and compares the groups at the same age, which monthly totals cannot do.
- Read rows for one cohort over time, columns for cohorts at the same age, and diagonals for calendar effects such as a November sale.
- Compare cohorts per customer and in gross profit, so cohort size and first-order discounts do not distort the result.
- A cohort is worth acquiring when its cumulative gross profit per customer passes its CAC within a time you can accept.
Cohort analysis in ecommerce groups customers by the month of their first order and follows what each group buys in the months after. It shows whether the customers you win today come back and spend as much as the customers you won before. A monthly revenue total cannot show that, because it mixes new and returning customers of every age.
This guide explains how to build an acquisition cohort table, how to read retention and cumulative gross profit per customer, which mistakes distort the picture, and what ROASaurus shows.
What is a cohort analysis?
A cohort is a group of customers who share a starting point. In ecommerce, the usual starting point is the first order. Everyone who first bought in March is the March cohort, whatever channel they came from.
A cohort table has one row per cohort and one column per period since the first order. M0 is the month of the first order, M1 is the month after it, and so on. Each cell answers one question for one group at one age: how many customers came back, how much they spent, or how much gross profit they left.
This layout compares customers of the same age. The March cohort in its third month can be compared with the June cohort in its third month, even though those months fall in different seasons.
Shopify has a built-in customer cohort analysis report that groups customers by their first order in the same way. Its metrics are customer counts, retention and sales. To see cohorts in gross profit, you also need the costs of every order: product cost, shipping, payment fees and handling.
How to build a cohort table
- Collect paid orders with a customer identity
Every order needs a customer id or an email address. Without one, you cannot link a second order to the first. Leave out cancelled and unpaid orders.
- Find each customer's first order
The month of that order is the customer's cohort.
- Give every order an age
Count the months between the cohort month and the month of the order: 0 for the first month, 1 for the next, and so on.
- Add up per cohort and age
Sum the orders, revenue and gross profit in each cell, and count the customers who ordered.
- Divide by the cohort size
Divide by the number of customers in the cohort, so cohorts of different sizes can be compared.
- Choose per period or cumulative
A per-period cell shows that month only. A cumulative cell adds up every month so far, which is what you compare with acquisition cost.
Google Analytics offers a similar choice in its cohort exploration, with standard, rolling and cumulative calculations. Standard counts each period on its own, and cumulative adds up the periods so far. For webshop cohorts, use per-period cells for retention and cumulative cells for value.
How to read a cohort table
Here is a retention table for an example store, seen at the start of January. Each cell shows the share of the cohort that ordered again in that month.
| First order | Customers | M1 | M2 | M3 | M4 | M5 |
|---|---|---|---|---|---|---|
| July | 1,000 | 8% | 6% | 5% | 9% | 7% |
| August | 900 | 8% | 6% | 10% | 7% | – |
| September | 1,100 | 7% | 11% | 7% | – | – |
| October | 1,050 | 12% | 8% | – | – | – |
| November | 2,400 | 5% | – | – | – | – |
Read the rows
A row follows one cohort over time. In this example, the July cohort orders again at 8% in its first month. The rate falls to 5% by its third month, then jumps to 9% in November.
Read the columns
A column compares cohorts at the same age. In M1, October did best at 12% and November worst at 5%. But the M1 of the October cohort was November, the sale month. So part of that 12% comes from the sale, not from the cohort.
Read the diagonals
A diagonal is one calendar month across all cohorts. The November diagonal reads 9%, 10%, 11% and 12%: every older cohort bought more in November. When a diagonal stands out, the cause is something that happened in that month, such as a sale, a product launch or a delivery problem. It says nothing about the quality of the cohorts.
The November cohort itself is the real question. It is more than twice the size of the others, but only 5% of it came back in December. In the same month, every other cohort came back at 7% or 8%.
Cumulative revenue and gross profit per customer
Retention tells you whether customers come back. Cumulative value per customer tells you what they are worth. Add up everything a cohort bought from its first order onward and divide by the number of customers in the cohort. Do it in gross profit, not only in revenue, because gross profit is what pays back the cost of acquiring the customer.
Behind the two lines: the March cohort's first orders averaged $70 at a 48% gross margin rate, so they left $33.60 per customer. The November cohort's first orders would have been $80 at full price, at the same 48% gross margin rate. After a 20% discount they averaged $64, but their costs stayed at $41.60. The gross margin rate fell to 35%, and each first order left $22.40. The discount cut the margin on the first order, and fewer of those customers came back.
A cohort is worth acquiring when its cumulative gross profit per customer passes its CAC within a time you can accept. The month where that happens is the payback period. For the March cohort, it is M0. For the November cohort, it has not happened yet. How to set that limit is covered in customer lifetime value for Shopify stores, and the margin itself is explained in contribution margin in ecommerce.
Common cohort analysis mistakes
Mixing cohort sizes
A cohort of 150 customers and a cohort of 2,400 do not deserve the same weight. When you average cohorts, weight each one by its number of customers. Treat small cohorts with care: in a cohort of 150, three customers who each spend $200 more move the average by $4.
The opposite mistake is to compare cohort totals. The November cohort has the most revenue in total only because it has the most customers. Compare cohorts per customer.
Reading young cohorts as worse
A cohort that started last month has had one month to buy. Compare it only with older cohorts at the same age. The last cell of a row can also be the current month, which is not over yet, so it looks low until the month ends.
Ignoring seasonality
Cohorts acquired in a sale month, such as November, behave differently from cohorts acquired at full price. Compare them with the same month a year earlier, not with the month before. And check the diagonals before you blame a cohort: if every cohort had a weak month at the same time, the cause is the calendar.
Ignoring first-order discounts
A discount on the first order brings in customers at a lower margin, and some of them came for the discount rather than for the product. Split cohorts by the discount code on the first order and compare their gross profit per customer.
Losing customers who check out as guests
If a returning customer checks out with a different email address, they look like a new customer. Their second order starts a new cohort instead of counting as a repeat order. Repeat rates then come out too low and new-customer counts too high. Encourage customer accounts, and read repeat rates as a lower limit.
How to act on a cohort analysis
- Set what you can pay for a customer. Read the cumulative gross profit per customer at the payback time you accept, for example 6 months. That is your maximum CAC.
- Move budget to cohorts that repeat. Split cohorts by first product, discount code or first ad channel, and put more budget behind the groups that keep buying.
- Time your follow-up emails. If most second orders come in the second month, send the reminder before that, not after.
- Fix the first-order offer. If discounted cohorts never catch up, test a smaller discount or another offer, and compare the new cohorts after three months.
- Use payback to judge first-order losses. A cohort that pays back in M2 can justify campaigns below their first-order break-even ROAS. A cohort that never pays back cannot.
Cohort analysis in ROASaurus
The cohort report in ROASaurus lifetime value is built from your orders and the product costs in profit analytics. Customers are identified by Shopify customer id or email, and only paid orders count.
- Cohorts by the week, month, quarter or year of the first order, as a matrix or as curves, with CSV export.
- 14 metrics, among them Customers returning (%), Cumulative orders per customer, Cumulative revenue per customer and Cumulative contribution margin per customer. That last metric takes off product costs, shipping, order fees, payment fees, handling and pass-through tax, and it is before ad spend. It is the one that matches gross profit per customer as this guide uses the term. The report also has a Cumulative gross profit per customer metric, but it keeps the tax you collected in, unless Taxes collected is set to Left out of revenue under Profit › Cost settings.
- Each row shows the number of customers, CAC, R% (the share with a second order so far) and the average first order. CAC is the ad spend in the cohort's period divided by every new customer acquired in it.
- The average row weights per-customer metrics by the number of customers in each cohort.
- A green outline marks the period in which a cohort's cumulative margin per customer passed its CAC: the payback period.
- For monthly cohorts, striped cells show predicted values up to 24 months, from your store's own repeat curve.
- Filters on the first order: first product, product type, vendor, discount code, country, first ad channel, sales channel, UTM source, medium or campaign, customer tag or order tag.
- Repurchase rates per first-order month within 30, 60, 90, 180 and 365 days. A window that has not passed for every customer in the cohort is marked with an asterisk.
Ask AI can answer questions about your cohorts too. It reads the monthly cohorts, the cumulative contribution margin per customer and the CAC payback month for you.