Skip to content
CRO

Ecommerce Retention Analytics: How to Measure Customer Retention

How to measure ecommerce retention: repeat rate, time to second order, cohort retention curves, purchase cycles, drivers of repeat buying and fair comparisons.

Quick answer

Measure ecommerce retention at customer level from order history. Track the share of customers who place a second order, the median time to that order, and cohort retention curves showing how each acquisition cohort keeps buying over the following months. Choose windows that match your purchase cycle, exclude refunded and test orders, compare cohorts rather than blended averages, and segment by first product, channel and discount to find what's associated with customers coming back. Then test the actions those patterns suggest.

Retention Is a Measurement Problem First

Most ecommerce stores don't have subscriptions, so there's no cancellation event that tells you a customer has left. Retention has to be inferred from purchase behaviour, which makes definitions and windows central. A store selling coffee and a store selling mattresses will see very different repeat patterns, and neither is wrong. Retention analytics is about measuring your own pattern accurately, then seeing whether changes improve it.

This article covers measurement. For strategies to improve retention, see ecommerce customer retention and repeat purchases. For subscription-specific retention, see subscription ecommerce retention.

The Core Retention Metrics

MetricHow to calculateWhy it matters
Second-order rateCustomers with 2+ orders ÷ customers acquired, within a windowThe biggest drop-off in most stores
Time to second orderMedian days from first to second orderSets timing for follow-up
Repeat purchase rateShare of customers with 2+ orders to dateHeadline retention figure
Cohort retentionShare of a cohort ordering in each later periodShows decline and plateau
Orders per retained customerOrders ÷ customers with repeat ordersDepth of relationship
Returning customer revenue shareRevenue from customers with prior orders ÷ totalDependence on acquisition

Choosing Windows That Fit Your Purchase Cycle

Before measuring, find your natural purchase cycle. Take all customers with at least two orders and plot the distribution of days between first and second order. The median and the 75th percentile give you sensible windows. If most second orders arrive within 60 days, a 90-day second-order rate is informative. If they spread over a year, short windows will make retention look worse than it is.

Always compare like with like. A cohort acquired last month can't be compared with one acquired a year ago on repeat rate to date, because the older cohort has had more time. Use fixed windows (ordered again within 90 days of first order) so every cohort is judged over the same period.

Second-order rate within 90 days (SQL sketch)
with firsts as (
  select customer_id, min(order_date) as first_date
  from orders where status = 'paid' and not is_test
  group by customer_id
)
select date_trunc('month', f.first_date) as cohort,
       count(*) as customers,
       avg(case when exists (
         select 1 from orders o
         where o.customer_id = f.customer_id
           and o.order_date > f.first_date
           and o.order_date <= f.first_date + interval '90 days'
           and o.status = 'paid' and not o.fully_refunded
       ) then 1.0 else 0 end) as second_order_rate_90d
from firsts f
where f.first_date <= current_date - interval '90 days'
group by 1 order by 1;

Cohort Retention Curves

A cohort retention curve plots, for each acquisition cohort, the share of customers ordering in month 1, 2, 3 and onwards after their first purchase. Curves usually fall sharply after the first order and then flatten. The shape matters: where the curve flattens shows the size of your loyal base, and how quickly it falls shows how many customers never return.

Read the table in two directions. Across a row, one cohort ages. Down a column, you compare cohorts at the same age. Improvements from a change (a better unboxing, a new loyalty programme, a different acquisition channel) show up as newer cohorts sitting higher at the same age. See ecommerce cohort analysis for building the table.

Finding What Is Associated With Retention

Once retention is measured, segment it. Compare second-order rates by first product category, first order value, discount used, acquisition channel, device, delivery speed, whether the first order had a return, and region. Patterns here generate hypotheses: customers acquired with deep discounts may return less often; customers whose first order arrived late may return less often; certain first products may lead to repeat buying of related items.

These are associations, not causes. Customers who bought a starter kit might return more because the kit suits committed buyers, not because the kit creates commitment. Use the patterns to decide what to test. See customer segmentation.

CutExample question
First product categoryWhich first purchases lead to repeat orders?
Acquisition channelDo some channels bring one-time buyers?
First-order discountDo discount-led customers return at full price?
Delivery experienceDoes late delivery reduce second orders?
Returns on first orderDoes a return end the relationship or not?
Region and marketDoes retention differ by market?

Not sure whether your retention is improving?

ZSpace sets up cohort retention reporting from your order data, with definitions your team agrees on.

Start a Project

Retention and Value Together

Retention rate alone can mislead. A programme that brings back many low-value customers might look better on repeat rate than one that brings back fewer high-value customers. Track revenue retention alongside customer retention: the share of a cohort's first-period revenue that recurs in later periods, net of refunds. Link retention to customer lifetime value so improvements are judged on value, not headcount.

Measuring Retention Programmes

Retention tactics such as post-purchase email, loyalty points, replenishment reminders and win-back offers are often credited with every repeat order from customers who received them. Many of those customers would have returned anyway. The fair test is a holdout: randomly withhold the programme from a small group and compare repeat rates over the purchase cycle. The difference is the programme's effect.

Holdouts need enough customers and enough time. For small stores, a pre and post comparison of cohorts is weaker evidence but better than attributing all repeat orders to the programme. See personalization testing for holdout design and loyalty programme UX.

Retention Dashboards

  • Second-order rate within a fixed window, by monthly cohort
  • Median time to second order, trend over cohorts
  • Cohort retention table (customers and revenue)
  • Returning customer revenue share
  • Retention by first product, channel and discount
  • Holdout results for retention programmes
  • Notes marking changes (new programme, pricing, fulfilment) on the timeline

Data Quality Checks

Retention figures are sensitive to data issues. Check that guest orders match to customers consistently, that test and staff orders are excluded, that refunds and cancellations are applied, and that marketplace or wholesale orders are separated if they behave differently. When a platform migration changes customer IDs, map old and new identities before comparing cohorts across the migration. See ecommerce customer analytics for building the customer table.

Worked Example

An illustrative scenario, not a client case: a skincare store's blended repeat rate looks stable, but a cohort table shows newer cohorts sitting lower at month three. Segmenting by channel shows the decline comes from customers acquired through a heavy first-order discount campaign. The team tests a smaller first-order incentive plus a sample of a complementary product, with a holdout, and compares second-order rates at 90 days. Decisions are made on the cohort comparison rather than the blended figure.

Retention by Category Purchase Cycle

Stores that sell across categories with different cycles should measure retention by category as well as overall. A customer who bought a winter coat isn't lapsed after three months; a customer who bought contact lens solution may be. Set windows per category using the same gap analysis, and track cross-category repeat purchases (a first order in one category followed by an order in another) separately, since that's often where growth comes from.

Category typeTypical cycle patternMeasurement approach
Consumables and replenishmentShort, regularCustomer-specific expected reorder dates
Fashion and apparelSeasonalSeason-over-season retention
Home and furnitureLong, irregularLonger windows, accessory and add-on orders
ElectronicsLong for devices, short for accessoriesSeparate device and accessory retention
GiftsOccasion-drivenYear-over-year occasion retention

Leading Indicators of Retention

Retention results take a full purchase cycle to appear, which is slow for decision-making. Leading indicators give earlier signals: first-order delivery on time, first-order return rate, review submission, account creation, email engagement in the first weeks and product usage signals where available (such as a subscription's first skip). Track these for each cohort; if they move, retention often follows. Confirm the relationship in your own data before relying on it.

Retention Reporting on Shopify

Shopify analytics includes customer reports such as returning customer rate and customer cohort analysis, which cover common views without extra tools. For windows tied to your purchase cycle, revenue retention and segmentation by first product or channel, export orders or connect them to a warehouse. Keep the same definitions in both places so figures match. See Shopify analytics guide.

Common Mistakes

  • Comparing young and old cohorts on repeat rate to date
  • Windows that ignore the purchase cycle
  • Counting refunded second orders as retention
  • Crediting retention programmes with all repeat orders
  • Reading associations as causes
  • Tracking customer retention without revenue retention

Ready to measure retention properly?

Talk to ZSpace about retention and analytics audits, data pipelines and automated retention reporting.

Start a Project

Conclusion

Retention analytics starts with definitions: windows that fit the purchase cycle, clean order data and cohorts compared at the same age. Focus on the second order, segment to find patterns, pair customer retention with revenue retention, and use holdouts to measure programmes. Related: ecommerce churn analysis.

FAQ

Common questions

The measurement of whether and when customers buy again: repeat purchase rate, time to second order, cohort retention curves, purchase frequency and the factors associated with repeat buying.

Get in touch

Have a project in mind?

Whether you're building a new digital product, improving an existing website, or looking to automate part of your business — let's talk.