Skip to content
Measurement 9 min read

Cohort Analysis for Ecommerce Ads: How to Use Cohorts to Improve Your Ad Spend

Cohort analysis shows you which customers pay back and which do not. Here is how to build cohorts, read them, and use them to make smarter ad spend decisions.

Most ecommerce brands measure ad performance the same way: look at last month's spend, compare it to last month's revenue, calculate ROAS, and decide whether to scale or cut. This approach has a problem. It treats all customers as if they behave the same, and it ignores what happens after the first purchase.

Cohort analysis fixes that. A cohort is a group of customers who share a common trait, usually the time they were acquired or the channel they came from. By tracking how each cohort behaves over time (how much they spend, how often they return, how long they stay), you get a clearer picture of customer quality and can make better budget decisions.

This guide covers what a cohort is, how to build acquisition-month and channel cohorts, how to read a cohort table, and how cohort data informs your CAC limits and channel allocation. For related measurement concepts, see our guides to customer payback period, LTV-to-CAC ratio, and ROAS vs MER vs CAC.

What is a cohort?

A cohort is a group of customers defined by when or how they entered your business. The most common types:

Acquisition-month cohort. All customers who made their first purchase in a given month. January 2026 cohort, February 2026 cohort, etc.

Channel cohort. All customers who came from a specific acquisition channel. Meta cohort, ChatGPT ads cohort, organic cohort, email cohort.

Campaign cohort. All customers acquired from a specific campaign or ad set. Useful for testing new offers or creative strategies.

You can also create hybrid cohorts: January 2026 Meta customers, February 2026 ChatGPT customers, etc.

The point of a cohort is to track behavior over time for a defined group. Instead of asking "how much revenue did we make this month," you ask "how did January's customers behave in month one, month two, month three, and beyond."

Why cohort analysis matters for ad spend

Traditional ROAS and MER are point-in-time metrics. They tell you what happened last month but do not tell you what will happen. Cohort analysis adds a time dimension.

Reveals true customer value. A customer who buys once for $50 and never returns is worth $50. A customer who buys $50 every quarter for two years is worth $400. Cohorts show you who returns and who does not.

Exposes channel quality differences. Meta might acquire customers at $25 CAC while ChatGPT acquires at $35 CAC. But if ChatGPT customers have a 40% repeat rate while Meta customers have a 20% repeat rate, the ChatGPT cohort may be more valuable despite the higher upfront cost.

Informs payback period. How long does it take to recover the cost of acquiring a customer? Cohort analysis shows when you break even, which determines how much capital you need to fund growth.

Guides budget allocation. If you know that organic customers have 3x the lifetime value of paid customers, you might invest more in content and SEO even if paid looks efficient on short-term ROAS.

Building an acquisition-month cohort table

An acquisition-month cohort table tracks how each month's new customers behave over time. Here is how to build one in a spreadsheet.

Step 1: Define your cohorts

Each row is a cohort. For monthly cohorts, you might have:

  • January 2026 (all customers whose first order was in January 2026)
  • February 2026
  • March 2026
  • And so on

Step 2: Choose your metric

Common metrics for cohort analysis:

  • Revenue per customer: Total revenue from the cohort divided by number of customers, cumulative over time.
  • Repeat purchase rate: Percentage of the cohort that made a second (or third, fourth) purchase.
  • Contribution margin per customer: Revenue minus COGS and variable costs, cumulative over time.

Contribution margin is most useful for ad decisions because it connects to payback period.

Step 3: Track by period

Columns represent time since acquisition: Month 0 (the acquisition month), Month 1, Month 2, etc.

Hypothetical example: A Shopify brand tracks contribution margin per customer for three acquisition cohorts.

CohortCustomersMonth 0Month 1Month 2Month 3Month 4Month 5Month 6
Jan 2026500$18$22$25$28$30$32$34
Feb 2026550$17$21$24$27$29$31
Mar 2026480$19$24$28$31

How to read this table:

  • January 2026 cohort had 500 customers. In their first month (Month 0), they generated an average of $18 contribution margin each.
  • By Month 3, cumulative contribution margin per customer reached $28.
  • By Month 6, cumulative contribution margin per customer reached $34.

The diagonal staircase pattern (February has fewer months of data than January, March has fewer than February) is normal. Newer cohorts have less history.

Step 4: Calculate CAC recovery

If the January 2026 cohort had a $25 CAC (total ad spend divided by customers acquired), you can see when they paid back.

  • Month 0: $18 margin, $7 short of $25 CAC
  • Month 1: $22 margin, $3 short
  • Month 2: $25 margin, breakeven
  • Month 3+: Profit

This cohort pays back in about two months. That tells you how long your cash is tied up.

Our customer payback period guide explains payback math in detail.

Building a channel cohort table

Channel cohorts compare customer quality across acquisition sources. Same structure, but rows are channels instead of months.

Hypothetical example: A brand compares three acquisition channels over six months.

ChannelCustomersCACMonth 0Month 1Month 2Month 3Month 4Month 5Month 6
Meta Ads800$22$16$19$21$23$24$25$26
ChatGPT Ads200$32$20$26$30$34$37$40$42
Organic300$8$22$29$34$38$41$44$46

What this shows:

  • Meta Ads: $22 CAC, pays back in Month 3 ($23 cumulative margin), reaches $26 by Month 6.
  • ChatGPT Ads: $32 CAC, pays back just before Month 2 ($30 margin), reaches $42 by Month 6. Despite higher CAC, this cohort generates more long-term value.
  • Organic: $8 CAC (lower because it includes only email and content costs), pays back immediately, reaches $46 by Month 6.

If you only looked at CAC, you might think Meta is the best channel. But ChatGPT customers are worth $42 versus $26 over six months, and organic customers are worth $46. The long view changes the picture.

How cohort data informs CAC limits

Knowing cohort behavior helps you set a maximum CAC for each channel.

Step 1: Determine acceptable payback period.

Cash-constrained brands might need 3-month payback. Well-funded brands might tolerate 12-month payback.

Step 2: Find cohort margin at your payback deadline.

Using the hypothetical channel table above, if you need 3-month payback:

  • Meta cohort reaches $23 margin by Month 3. Max CAC: $23.
  • ChatGPT cohort reaches $34 margin by Month 3. Max CAC: $34.
  • Organic cohort reaches $38 margin by Month 3. Max CAC: $38.

Step 3: Set channel CAC targets.

If Meta's current CAC is $22 and your limit is $23, you have almost no margin for error. If ChatGPT's current CAC is $32 and your limit is $34, you have a $2 cushion.

This approach is more sophisticated than flat CAC targets because it accounts for how different channels produce different customer quality.

How cohort data informs channel budgets

Cohort analysis also helps with budget allocation.

Scenario 1: Scale the high-value channel.

If ChatGPT customers are worth $42 after six months versus Meta's $26, and both channels have room to grow, consider shifting budget toward ChatGPT. The higher CAC is justified by higher long-term value.

Scenario 2: Fund organic carefully.

Organic customers are worth $46, but organic has limited levers. You cannot simply spend more to get more organic customers the way you can with paid. Invest in content, SEO, and email capture, but do not expect linear scaling.

Scenario 3: Cut underperforming cohorts.

If a channel consistently produces cohorts with low repeat rates and margins that never recover CAC, reduce or eliminate spend there. Cohort data gives you the evidence.

Spreadsheet steps to build your own cohort table

Here is a practical workflow for a Shopify brand:

1. Export order data.

From Shopify (or your analytics tool), export all orders with: order date, customer ID, customer first order date, order total, product cost (for margin calculation), and acquisition source (if tracked via UTMs or post-purchase survey).

2. Identify first-order customers.

For each customer, find their first order date. This is their cohort date.

3. Assign cohorts.

Create a column for acquisition month (e.g., "2026-01" for January 2026). This is the cohort identifier.

4. Calculate contribution margin per order.

Revenue minus COGS, shipping, transaction fees. Roll this up per customer.

5. Map orders to periods since acquisition.

For each order, calculate how many months after the customer's first order it occurred. Month 0 is the acquisition month.

6. Build a pivot table.

Rows: Cohort month. Columns: Period (Month 0, Month 1, etc.). Values: Average cumulative contribution margin per customer in that cohort at that period.

7. Add CAC row.

For each cohort, calculate CAC: total marketing spend that month divided by new customers acquired. Add this as a reference row or column.

Tools like Excel, Google Sheets, or dedicated analytics platforms (Lifetimely, Triple Whale, Daasity) can automate parts of this.

Connecting cohorts to post-purchase surveys

If you do not have clean UTM tracking, a post-purchase survey can fill the gap.

Ask new customers: "How did you hear about us?" with options including Meta, ChatGPT, Google, friend, podcast, etc. Use responses to build channel cohorts.

Our post-purchase survey attribution guide covers how to set this up and interpret results.

Limitations of cohort analysis

Cohort analysis is powerful but has limits.

Requires time. You cannot build a six-month cohort table until six months have passed. For new products or channels, you must wait or make projections from early data.

Assumes past predicts future. If your product mix, pricing, or market changes, old cohorts may not predict new cohort behavior accurately.

Attribution is messy. A customer might see a Meta ad, then search on Google, then click a ChatGPT ad. Which channel gets credit? Cohort analysis by channel requires making attribution choices.

Small sample sizes. If you only acquired 50 customers from ChatGPT last month, cohort metrics will be noisy. Wait for more data before making big decisions.

How SecondWin helps with acquisition quality

SecondWin is a done-for-you ChatGPT ads service for consumer brands. It reads your site, studies the longest-running ads in your niche in Meta's Ad Library, and writes original ChatGPT ads around the messages that keep working. Every ad is checked against OpenAI's policies before launch.

ChatGPT ads reach buyers who are actively asking questions, which often means more considered purchases and better customer quality. If your cohort analysis shows that ChatGPT-acquired customers have strong repeat rates and long-term value, SecondWin can help you scale that channel without handling the creative and policy work yourself.

Run a free analysis of your store or see plans and pricing. SecondWin is independent and not affiliated with OpenAI.

FAQ

What is a cohort in ecommerce?

A cohort is a group of customers who share a common trait, usually when they were acquired (acquisition-month cohort) or how they were acquired (channel cohort). Tracking cohorts over time shows you how customer behavior differs by group.

How do I build a cohort table?

Export order data with customer ID, order date, first order date, revenue, and costs. Assign each customer to a cohort based on their first order month or acquisition channel. Calculate cumulative contribution margin per customer at each month since acquisition. Build a pivot table with cohorts as rows and months as columns.

What does cohort analysis tell me about ad spend?

Cohort analysis shows which channels produce high-value customers who repeat and pay back their acquisition cost. This helps you set CAC limits by channel, allocate budget toward channels with better long-term value, and avoid overspending on channels that acquire customers who never return.

How is cohort analysis different from ROAS?

ROAS measures revenue versus spend in a single time window. Cohort analysis tracks how customers behave over months or years. A channel might look bad on 30-day ROAS but produce customers who repeat heavily by month six. Cohorts reveal this; ROAS does not.

How long do I need to wait before cohort data is useful?

It depends on your product's repeat cycle. For products bought monthly, three to six months of data is often enough. For products bought annually, you may need a year or more. Start tracking early even if you cannot act on the data immediately.

Run a Shopify store? See your product as a chatgpt ad, free.

Free tools

All 36 tools