• Blog
  • Shopify
  • Analytics

How to do a cohort analysis in Shopify

Jenn Starr, Co-founder, Selix

Published October 2, 2026 · 8 min read

The short answer

To do a cohort analysis in Shopify, open the customer cohort analysis report in Analytics, group customers by first order month, and compare how each group comes back and spends over time.

Revenue is up. Great. But are the customers you won last month better or worse than the ones you won last spring? Your dashboard can't tell you. A cohort analysis can.

This guide covers the built-in Shopify report, how to read it, how to slice it by channel and product, and how to build your own cohort grid from an orders export when the report doesn't go far enough.

What a cohort analysis tells a Shopify store owner

A cohort analysis groups customers by when they first bought, then follows each group forward. Every customer who placed their first order in March is the March cohort, forever.

That answers three questions store-wide averages hide:

  • Are new customers getting better or worse? Compare this spring's cohort with last spring's at the same age.
  • Did that sale bring loyal customers or one-time bargain hunters? Check whether the cohort from the promo month came back.
  • Which channels bring customers worth paying for? Split cohorts by the first order's marketing channel.

How to find the cohort analysis report in Shopify

Shopify builds the report for you. It groups customers by the date of their first order.

  1. In your Shopify admin, go to Analytics > Reports.
  2. Filter the category to Customers, or search for "cohort."
  3. Open Customer cohort analysis.
  4. In the configuration panel, set Intervals to monthly. Weekly and quarterly are also available.
  5. Pick your metric (more on that below) and a date range that covers at least your last 6 to 12 cohorts.

In the Shopify mobile app, it's under Analytics > Reports, then the filter icon, then Category > Customers.

Plan check: Shopify says Analytics comes with every plan, with more advanced reports on higher tiers. If you don't see the cohort report, your plan may not include it. The spreadsheet method further down works on any plan.

How to read a Shopify cohort grid

The default view is a heatmap grid:

  • Each row is a cohort: customers whose first order fell in that month.
  • Month 0 is the first order month. Retention there is 100% by definition.
  • Each column after that is months since the first order: Month 1, Month 2, and so on.
  • Darker cells mean a higher value.

Here's an example grid for a made-up store, showing the share of each cohort that ordered again in each month:

First order monthCustomersMonth 1Month 2Month 3
January42011%8%7%
February39012%9%8%
March (spring sale)9106%4%
April40513%
Illustrative numbers only.

Read it three ways:

  1. Across a row: how one cohort behaves as it ages. January drops from 11% to 7% and levels off. That flattening is your loyal core.
  2. Down a column: whether newer cohorts beat older ones at the same age. Month 1 goes 11%, 12%, 6%, 13%. Improving, except for March.
  3. Spot the outlier: March more than doubled new customers, and they came back at half the rate. The sale bought orders, not customers. That's the insight you'd miss looking at March revenue alone.

Switch the visualization to Retention curve to see the same data as lines. A curve that flattens means you've found customers who stick. A curve that keeps falling toward zero means you haven't yet.

Click any cell to see the detail behind it: total sales, average order value, orders per customer, new vs. returning counts, top marketing and sales channels, and top locations.

Which cohort metric to use: retention, sales or spend per customer

The report can show several metrics. Pick one question at a time.

MetricUse it to answer
Customer retention rateDo customers come back at all? Start here.
Number of customersHow many people from each cohort ordered in that period?
Gross sales / net salesHow much revenue does each cohort bring in over time? Turn on cumulative values to see the running total.
Average order valueDo returning customers spend more per order than they did the first time?
Amount spent per customerWhat is a customer from this cohort worth so far? The closest thing to lifetime value in the report.

With Amount spent per customer selected, you can turn on Show projections. Shopify predicts future spend per cohort using up to 24 months of your store's data. Shopify's own caveat: projections aren't a guarantee and can come in higher or lower than reality. Use them for direction, not for a budget.

How to compare Shopify cohorts by marketing channel, product and location

The real value is in the filters. Shopify lets you filter cohorts by attributes of the first order:

  • Marketing channel and marketing type: paid social vs. email vs. organic search. This is how you find out which channels bring customers who return, not just customers who convert.
  • Sales channel: online store vs. POS vs. marketplaces.
  • Product name: does a first order of your hero product lead to more repeat orders than a first order of anything else?
  • Subscription: subscribers vs. one-time customers.

And by customer attributes: country, region, city, and email subscription status.

You can also compare against the previous period, the previous year, or between cohorts.

A good first pass: run the grid twice, once filtered to paid social, once to email or organic. If the paid cohort's Month 3 retention is half the organic one, your customer acquisition cost is really twice what the ad dashboard says.

How to build a cohort analysis from a Shopify orders export

The built-in report won't cover everything. You'll want your own grid when you need to group by something the filters don't offer (first discount code, first order value band, a custom tag), or if your plan doesn't include the report.

1. Export your orders

Go to Orders > Export, choose all orders (or a date range covering at least 12 months), and export as CSV. Open it in Google Sheets or Excel.

The export has one row per line item, so an order with three products takes three rows. Keep the first row of each order (dedupe on the Name column, which holds the order number) and drop cancelled or fully refunded orders if you want a clean count.

2. Add three helper columns

Assuming Email is in column B and Created at is in column C:

  • Order date (column D): =DATEVALUE(LEFT(C2,10))
  • First order date (column E): =MINIFS(D:D, B:B, B2)
  • Months since first order (column F): =DATEDIF(EOMONTH(E2,-1)+1, EOMONTH(D2,-1)+1, "M")

Add a Cohort column (G) that labels the first order month: =TEXT(E2, "yyyy-mm")

3. Build the pivot table

  • Rows: Cohort
  • Columns: Months since first order
  • Values: count of unique Email (COUNTUNIQUE in Google Sheets, or "distinct count" via the Data Model in Excel)

That gives you customers active per cohort per month.

4. Turn counts into retention rates

Divide each cell by the Month 0 value in the same row. Format as percentages and add conditional formatting as a color scale. That's your heatmap.

To group by something else, add a column for it (first discount code, first product, first order total band) and use it as a pivot filter or an extra row field.

Common cohort analysis mistakes on Shopify

  • Judging young cohorts too early. Last month's cohort has had one month to come back. Compare cohorts at the same age, never the whole row.
  • Reading tiny cohorts. Weekly cohorts of 30 customers swing wildly. Use monthly unless you have a lot of orders.
  • Ignoring your buying cycle. Coffee sells again in weeks. Furniture sells again in years. Pick the interval that matches how often people really need you.
  • Letting one promo month skew the average. Black Friday and big sale cohorts often behave differently. Look at them on their own.
  • Expecting today's orders. Shopify notes customer reports may not show the last 12 hours of activity.
  • Forgetting that customers are matched by email. A shopper who checks out with two different emails shows up as two customers.

How to track shoppers who found you through AI as a cohort

More shoppers now ask ChatGPT, Perplexity, Gemini or Google's AI results what to buy before they ever visit a store. Those customers deserve their own cohort. They arrive having already been told you're a good pick, and it's worth knowing whether they come back.

To track them:

  1. Tag first visits from AI assistants with UTM parameters or referrer data. Some assistants add their own source tag to outbound links, and others show up only as a referrer.
  2. Carry that source onto the first order (a customer tag or an order note attribute works).
  3. Filter the cohort report by that first order attribute, or add it as a column in your spreadsheet grid.

Then compare AI-referred cohorts against paid and organic ones. If they return at a higher rate, AI referral traffic isn't just a traffic source. It's a customer quality source.

Shopify cohort analysis FAQs

Is the cohort analysis report free in Shopify?

It's part of Shopify Analytics, which comes with every plan. Which reports you see can depend on your plan, so if it's missing from your Reports list, use the orders export method in this guide.

How many months of data do I need for a cohort analysis?

You can start with three months, but six to twelve cohorts is where patterns show up. You need enough months for the oldest cohorts to reach Month 3 or later.

What's the difference between the cohort report and the returning customers report?

The returning customers report lists everyone with two or more orders. The cohort report shows when they came back, grouped by when they started, so you can compare groups over time.

Can I see cohort analysis for customers who used a discount code?

Not directly in the built-in filters. Export your orders, add a column for the first order's discount code, and use it as a pivot filter.

Why does my latest cohort look so much worse than the others?

It's younger. A cohort from last month has had one month to reorder, while older cohorts have had many. Only compare cohorts at the same month number.

About the author

Jenn Starr, Co-founder, Selix

Jenn has spent 20+ years helping SaaS startups build their marketing and implementation playbooks. She has bootstrapped three marketing agencies and is a 500 Startups alum. At Selix, she leads the work of getting ecommerce brands named in AI answers.

Keep reading

All resources