Skip to content
Performetic

Ecommerce Growth

How to run a cohort analysis for ecommerce retention

Written by Published Last updated 6 min read
Black glass columns of varying heights in a dark studio, the tallest topped with a crimson ring of light

In short

A cohort analysis groups customers by the month of their first order and tracks how many of each group buy again in later months. It is the most honest way to measure ecommerce retention, because it exposes loyalty problems that growing new customer numbers can hide. You can build one in GA4, Shopify or a spreadsheet.

Contents6 min read
  1. 01How do you run a cohort analysis for an ecommerce store?
  2. 02What is a cohort and why does it matter in ecommerce?
  3. 03How do you read a cohort table?
  4. 04How do you build a cohort analysis in GA4?
  5. 05How do you build one from Shopify or raw order data?
  6. 06Which cohort metrics should you track?
  7. 07What should you do with the results?
  8. 08How often should you run a cohort analysis?
  9. 09Key takeaways

How do you run a cohort analysis for an ecommerce store?

To run a cohort analysis, group customers by the month they placed their first order, then track what share of each group orders again in month 1, 2, 3 and beyond. Rows are cohorts, columns are time since first purchase. Comparing rows tells you whether retention is getting better or worse over time.

A revenue chart tells you whether the business is growing. A cohort table tells you whether that growth is healthy. When you push ad spend, new customer counts can climb while returning customers quietly fade. Totals hide that. A cohort table shows it at a glance.

What is a cohort and why does it matter in ecommerce?

A cohort is a group of customers who share a starting point. In ecommerce that starting point is almost always the first order date. Everyone who bought for the first time in January 2026 is the January cohort.

The value is fair comparison. A customer acquired in March has had three months to come back by June; one acquired in January has had five. A single repeat purchase rate blends those together. A cohort table measures each group on its own clock.

In practice it answers questions like these:

  • Do Black Friday customers come back as often as customers we win in a normal month?
  • Are cohorts acquired after we launched the new post-purchase flow doing better?
  • How many months does it take to earn back what we paid to acquire a customer?

That last one is why cohort data sits underneath any serious conversation about CAC, LTV and ROAS. Instead of guessing lifetime value, you read it from what real cohorts actually spent.

How do you read a cohort table?

The table below is an example, not data from a real brand. Each cell shows the share of a cohort that placed at least one more order in that month.

Cohort (first order month) New customers Month 1 Month 2 Month 3 Month 6
January 2026 400 12% 8% 7% 5%
February 2026 380 11% 8% 6% 5%
March 2026 520 9% 6% 5% 3%
April 2026 450 13% 9% 8% -

Read it in three directions:

  1. Along a row: you see how one cohort decays. The month with the steepest drop is your intervention window. For most stores that is the first 30-60 days after the first order.
  2. Down a column: you compare cohorts at the same age. In the example, March is clearly weaker in month 1. If March was a heavy discount month, that suggests discount-driven customers are less loyal.
  3. Along a diagonal: cells that land on the same calendar month. If every cohort dips on the same diagonal, the problem is not the customers but something that happened that month, such as shipping delays, stockouts or a broken checkout.

April tells its own story: retention recovers after March. Asking "what changed in April?" is the most useful thing the table will give you.

How do you build a cohort analysis in GA4?

In GA4, use the Cohort exploration template under Explore. Based on Google's help documentation, the settings that matter are:

  • Cohort inclusion: for ecommerce choose Any transaction or your purchase event. First touch measures first visits, not customers.
  • Return criteria: again Any transaction, so you count people who bought again, not people who just browsed.
  • Granularity: daily, weekly or monthly. Pick monthly for categories with long purchase cycles.
  • Calculation: standard, rolling or cumulative. Standard counts each period on its own; cumulative adds up everyone who has returned at least once so far.

GA4 has limits. It identifies users by cookie and device, so one shopper on a phone and a laptop can look like two people, and visitors who decline cookies are missing. Use GA4 cohorts for direction, and calculate exact retention from order data.

How do you build one from Shopify or raw order data?

Shopify's Customers reports include a ready-made customer cohort analysis report. Customers are grouped by first order date, and you can switch the metric between number of customers, retention rate, gross and net sales, average order value and amount spent per customer. You can also filter cohorts by the sales channel or product of the first order. Check which plan and permissions show it in your own admin.

On ikas, Ticimax or WooCommerce, you can build the same table from an order export:

  1. Export 12-18 months of orders with customer email or customer ID, and remove cancellations and full refunds.
  2. Find each customer's first order month; that is the cohort label.
  3. Add a column for months since first order (0, 1, 2 and so on) on every order.
  4. Build a pivot: cohorts in rows, months since first order in columns, unique customers as values.
  5. Divide each cell by the cohort's month 0 customer count to get the rate.

Email usually makes a cleaner customer key than phone number. For privacy, work from a pseudonymised file with IDs only.

Which cohort metrics should you track?

Percentage of returning customers alone is not enough. Read these three together:

  • Retention rate: the share of a cohort that comes back.
  • Cumulative revenue per cohort: what the cohort has spent after 6 and 12 months. Set against acquisition cost, it gives you payback time.
  • Order frequency: how many orders returning customers place in the period.

Example: if you spent 200,000 TL on ads to win 400 customers in January, acquisition cost is 500 TL per customer. If that cohort's gross profit reaches 550 TL per customer by month 6, it paid back in six months. If the March cohort needs nine months to get there, you overpaid for discount-driven buyers.

What should you do with the results?

A table changes nothing on its own. These are patterns we see often and the moves that match them:

  • Steep month 1 drop: build an email and SMS flow aimed at the second order. The two to three weeks after first delivery are often the most productive window.
  • Weak campaign cohorts: customers acquired during big sales tend to return less. That is not a reason to skip the sale, but it is a reason to give them their own welcome flow.
  • One entry product brings more loyal cohorts: feature it as the first-purchase product in ads.
  • Every cohort dips in the same month: look at operations, including delivery times, returns and stock.

If you want to act on segments, pair cohorts with RFM customer segmentation. Cohorts tell you when people drop off; RFM tells you who is where right now.

How often should you run a cohort analysis?

Updating a monthly cohort table in the first week of each month is enough for most brands. After a big change, such as a loyalty programme, a subscription offer or a price change, wait for at least three cohorts before judging it. One good cohort can simply be seasonality.

Cohort data is one of the core inputs to a growth plan. If you want retention, budget and channel decisions handled together, our growth strategy service works from that frame.

If you would like to build a cohort table from your own data and see where you lose customers, you can book a free growth audit with the Performetic team.

Key takeaways

  • A cohort analysis groups customers by first order month and tracks repeat purchase in the months that follow.
  • Read the table along rows, down columns and across diagonals; each direction points to a different problem.
  • GA4 cohort exploration shows direction; take exact rates from order data or Shopify's cohort report.
  • Read retention together with cumulative revenue and acquisition cost.
  • Tie each finding to an action: a second-order flow, a better entry product or an operational fix.

Frequently asked questions

What is the difference between cohort analysis and RFM analysis?

Cohort analysis groups customers by first order date and shows how many come back over time. RFM sorts customers by recency, frequency and monetary value to describe where each one stands today. Cohorts reveal when drop-off happens; RFM helps decide which message goes to which customer right now.

How much data do you need for a cohort analysis?

A meaningful read is easier with at least 6-12 months of order history and a few hundred customers in each cohort. When cohorts are very small the rates swing a lot, so switching from monthly to quarterly cohorts usually gives a more stable and readable table.

Why does GA4 cohort data differ from my order data?

GA4 identifies users by cookie and device and cannot see visitors who decline cookies. One customer shopping on two devices may count as two users. That makes GA4 useful for spotting trends, while order data from your store platform is more reliable for exact retention rates.

What is a good retention rate for ecommerce?

There is no single benchmark. Categories bought often, such as cosmetics or food, naturally retain better than furniture or electronics. The most useful comparison is your own cohorts over time: if newer cohorts outperform older ones at the same age, you are moving in the right direction.

Sources

  1. Google Analytics Help: Cohort exploration
  2. Shopify Help Center: Customers reports

Your ad budget deserves more.

We review your store and ad accounts and send you three concrete growth opportunities, free of charge.

Get a free audit
Get a free audit