Skip to content
D2C Growth 16 min read

Cohort Analysis for Ecommerce: A Step-by-Step Guide

How to do cohort analysis for ecommerce step by step — build acquisition, behavioral, and revenue cohort tables, interpret the retention curve.

Siddharth Gangal Siddharth Gangal · Founder, Fairview Updated May 31, 2026 Reviewed by Jordan Cole Editorial standards

Key takeaways

How to do cohort analysis for ecommerce step by step — build acquisition, behavioral, and revenue cohort tables, interpret the retention curve.

Part of the D2C Metrics topic hub.

TL;DR

Cohort analysis for ecommerce groups customers by first purchase date and tracks what percentage return to buy again in month 1, month 2, month 3, and beyond. The output — a retention heatmap — reveals whether customer quality is improving, declining, or flat over time. This guide covers the three cohort types that matter (acquisition, behavioral, revenue), a six-step process to build your first table, retention benchmarks by category, and the specific actions operators take when cohort data reveals a problem.

What Is Cohort Analysis for Ecommerce?

A cohort is a group of customers who share a common starting event. In ecommerce, that event is almost always the first purchase date. Every customer who placed their first order in January 2025 belongs to the January 2025 cohort.

Cohort analysis tracks what happens to that group over time. Did 40% of January buyers return in February? Did 30% return in March? By month 6, what percentage of the original January cohort had made at least one more purchase?

The result is a table — rows are cohorts, columns are months since first purchase — that shows your brand's repeat purchase behavior in precise, comparable terms. Reading this table tells you whether your retention is improving or eroding, and which customer segments drive the most durable revenue.

The case for doing this rigorously: retained customers generate 3–5x more revenue per year than first-time buyers, and acquiring a new customer costs 5–7x more than retaining an existing one. A 5% improvement in retention can increase total revenue by 25–95% depending on the business model. These numbers only move if you can measure where the current baseline sits and which cohorts are underperforming.

WHY AGGREGATE REVENUE METRICS MISLEAD SCENARIO A — Revenue up 40% YoY New customers acquired: +80% M1 retention rate: 18% (down from 32%) M3 retention rate: 9% (down from 21%) Reality: customer quality deteriorating fast Growth is all acquisition — LTV collapsing SCENARIO B — Revenue up 40% YoY New customers acquired: +15% M1 retention rate: 38% (up from 28%) M3 retention rate: 28% (up from 18%) Reality: compound LTV engine building Same revenue growth, fundamentally different business

Two brands, identical revenue growth, opposite retention trajectories. Only cohort analysis reveals the difference.

Three Types of Cohort Analysis That Matter for Ecommerce

Not all cohorts are equal. The three that operators use most — acquisition cohorts, behavioral cohorts, and revenue cohorts — answer different questions.

Acquisition Cohorts

The most common type. Group customers by their first purchase month and track repeat purchase rates over time. This answers: how well does the brand retain customers acquired in a given period? It catches macro-level retention shifts caused by changes in ad creative, product quality, or post-purchase experience.

Behavioral Cohorts

Group customers by what they did on their first order — the product category they bought, whether they used a discount code, which channel drove acquisition, or whether they subscribed to email at purchase. Behavioral cohorts answer: which actions or entry points correlate with higher long-term retention and LTV?

A brand may find that customers who buy a specific "hero product" first have 2x the month-3 retention of customers who buy a promotional item first. That is an actionable finding that changes which products get featured in acquisition campaigns.

Revenue Cohorts

Track revenue per customer over time, not just the count of returning customers. A cohort that retains 35% of customers but whose returning buyers spend half as much as the original order is less valuable than a 30% retention cohort whose returning buyers increase average order value. Revenue cohorts measure cumulative revenue per cohort member over time — the direct input to LTV calculation.

Step 1: Gather the Right Data

1

Pull every order record with customer identity and date

The minimum data set for cohort analysis is: customer ID, order date, order revenue. Everything else is optional enrichment.

The required fields for a basic acquisition cohort table:

FieldPurpose in Cohort AnalysisSource
Customer IDLinks all orders to the same personShopify / order system
Order dateDetermines cohort assignment and time-since-first-purchaseShopify / order system
Order revenueRequired for revenue cohorts and LTV calculationShopify / order system
Acquisition channelRequired for channel-level cohort breakdownUTM params / ad attribution
First order flagIdentifies cohort membership dateDerived from order history

Guest checkout orders without customer IDs create gaps in cohort analysis. A customer who checked out as a guest on their first order cannot be linked to a later order even if they create an account. Brands with high guest checkout rates undercount retention — the actual repeat purchase rate may be materially higher than what the cohort data shows. Shopify's customer match logic can close some of this gap using email address matching.

Export the full order history. Do not limit to recent orders — cohort analysis requires longitudinal data. A 12-month history is the minimum for a meaningful cohort table. 24 months gives you enough cohorts to identify trends.

Step 2: Define Your Cohort Groups

Siddharth Gangal

Author

Siddharth Gangal

Founder, Fairview

Siddharth writes on operating intelligence, revenue operations, and the unbundling of business intelligence. Before Fairview, built revenue ops infrastructure across B2B SaaS and DTC.

Continue reading

More from this cluster

See d2c metrics in your data — book a 20-min demo

Editorial standards

Sources & further reading

Fairview cites primary sources only. The references below underpin the benchmarks and frameworks discussed in our D2C Metrics coverage. See our editorial standards.

  1. 1 DTC State of the Industry 2025 — Common Thread Collective, 2025. View source .
  2. 2 Shopify Plus DTC Benchmarks 2025 — Shopify, 2025. View source .
  3. 3 Klaviyo Ecommerce Benchmarks — Klaviyo, 2025. View source .
  4. 4 Northbeam DTC Marketing Report — Northbeam, 2025. View source .

Fairview cites primary sources only — government data, academic research, industry benchmarks from named publishers, and official vendor documentation. See our editorial standards.