Ecommerce analytics

Ecommerce analytics settles what you can pay for a new customer and which channels and offers deserve more spend. Both rest on contribution per order, after product cost, returns, delivery, payment fees and advertising.

Last reviewed

Contribution per order, example

£9.10 of a £58.40 order is left after every cost

Example data
  1. Average order value £58.40
  2. Product cost −£24.50
  3. Returns −£4.10 Returns: dated to the original order, spread across all orders
  4. Shipping and packaging −£6.90
  5. Payment fees −£1.60
  6. Ad spend −£12.20 Ad spend: month's spend, all platforms, ÷ month's orders
  7. Contribution per order £9.10, 15.6% of order value
Example data: an invented online shop's average October order, all figures excluding VAT. Ad spend takes £12.20, more than the £9.10 left at the end.

Ecommerce KPIs and their formulas

Seven KPIs with formulas, all net of VAT and refunds.

Seven ecommerce KPIs, each with the formula that goes into the model. Revenue in every one excludes VAT and is net of refunds, so the seven agree with each other.

KPIFormulaA good readingThe common mistake
Contribution per order(Net revenue − product cost − returns − shipping and packaging − payment fees − ad spend) ÷ ordersPositive on repeat orders, and on first orders either positive or paid back by repeat orders within an agreed horizonLeaving returns out because the refund lands next month. Date each return to its original order.
Average order valueNet revenue ÷ ordersRising without the return rate rising with itTaking revenue from one system and orders from another, such as storefront revenue over GA4 purchases
Conversion rateGA4 purchases ÷ GA4 sessionsRead by device and landing page, against the same weeks last yearDividing storefront orders by GA4 sessions. Visitors who decline cookies drop out of observed sessions and still place orders, so the rate comes out too high.
New-customer acquisition costAcquisition ad spend ÷ first-time customersBelow what a new customer contributes over the agreed horizonDividing all spend by all orders, which counts returning customers as if the ads had won them
Repeat purchase rateCustomers with two or more orders in 12 months ÷ customers with at least one order in those 12 monthsSteady or rising from one cohort to the nextCounting each guest checkout as a new person. Match customers on email address first.
Return rateValue of items returned ÷ value of items sold, by the month the order was placedSteady per product, with any outlier product looked intoReading the latest month as final. Returns keep arriving for weeks, so recent months look better than they'll end.
New-customer revenue shareRevenue from first orders ÷ total net revenueMatching the plan: high during a growth push, lower when the plan is retentionJudging a channel on total revenue when most of it came from customers who already knew the shop

The finance team reads contribution next to the monthly pack, laid out like the finance dashboard example. Other worked examples are in the KPI and dashboard library.

Where ecommerce data usually lives

The systems a shop runs on, and where joins break.

The storefrontOrders, refunds and customers, in Shopify or whichever platform the shop runs on. Shopify records a refund on the day it's processed, so a closed month's revenue keeps changing after it closes unless returns are dated back to the order.
The ad platformsSpend and the conversions each one claims, from Google Ads or whichever platforms you buy from. Google Ads counts any order it touched inside its attribution window. Check the window set in each of your other platforms, then add their totals together and compare them with the orders you took.
GA4Sessions, funnels and purchases. Visitors who decline analytics cookies are not recorded as users, though with consent mode GA4 may model some of them. That's one reason GA4 purchases run below storefront orders.
The payment providerFees and chargebacks, from Shopify Payments or whichever provider takes the card. If fees arrive as one line per payout, they have to be matched back to orders before contribution can be read per order.
The warehouse or 3PLReturns received and their condition. Returns are logged against a return number, and the link back to the order ID is the join to check first.

An order that loses money after returns and ad spend still shows up as growth on a revenue dashboard.

Shopify analytics, GA4 and the ad platforms: three order counts

Why three systems give three order counts.

The storefront countEvery order taken, through every sales channel the shop runs, including orders staff key in by hand. Finance reports this one.
The GA4 countPurchases where the tag fired and the visitor's consent allowed it to be recorded. It's lower than the storefront, and the gap is measured each month and split into consent declines, blocked tags and an unexplained remainder.
The ad platform countsConversions each platform credits to itself, by its own window. In Google Ads that can include people who saw an ad and never clicked. Two platforms can both claim the same order.

Each count has a job. The storefront count is the business total. GA4 shows what happens on the site, and platform counts compare campaigns inside one platform. The gap between storefront and GA4 goes on the dashboard as a number of its own, so a sudden change in it gets noticed.

Analytics services for online shops

The services online shops need most, and why.

Split new customers from returning ones before you judge any channel. A channel whose buyers mostly bought from you last month will always look cheap.

What an ecommerce dashboard should split first

Why new and repeat orders get split first.

Every revenue line on the dashboard comes in two: first orders and repeat orders. A customer is new on their first order, matched by email address across guest and account checkouts.

Brand search shows why. It looks cheap per order, because many of the people typing your shop's name have bought before. Divide the same spend by first orders only and the cost per new customer comes out much higher. So the dashboard shows contribution per order for each group, and acquisition cost against first orders alone.

AI in ecommerce analytics

What an AI assistant needs before it can answer.

Ask an AI assistant "what was contribution per order on first orders from paid social last month?" If contribution is already defined in the data with the rules on this page, it uses them. Without those definitions it writes its own, and the answer may leave out returns and ad spend without saying so. AI-led analytics starts from the definitions and shows the query behind every answer.

Questions people ask

Answers on GA4, attribution, testing and Shopify.

Do you set up GA4 for ecommerce?

Yes. The purchase event sends the storefront's own order number as its transaction ID, so every GA4 purchase can be matched to an order. That match is what lets us measure the gap between GA4 and the shop each month and say how much of it comes from consent declines and blocked tags.

How do you handle attribution for ecommerce?

Platform attribution is fine for comparing campaigns inside one platform. It can't tell you whether the spend added orders, because each ad platform counts by its own attribution window, and two platforms can claim the same order. That question needs a geo holdout test or a marketing mix model.

Do you run A/B testing for ecommerce sites?

Yes. Sample size and run length are fixed before the test starts, from your baseline conversion rate and the smallest lift worth having. Results are read on orders and revenue per visitor, and on returns too when a change might bring in buyers who send more back.

Do you work with Shopify?

Yes. Shopify's sales reports date a refund to the day it was processed, so a closed month keeps changing. Once orders need joining to ad spend, payment fees and returns, we bring orders, refunds and customers into a warehouse you own, date each return to its original order and build contribution per order there.

What's a good contribution margin for an online shop?

A first order can lose money and still be worth taking, if repeat orders over the horizon you've agreed, say 12 months, pay the gap back. The test is whether first-order contribution plus expected repeat contribution covers what you paid to acquire the customer.

Want contribution per order for your shop?

Bring one month of orders, refunds and ad spend. The first call finds which costs your current numbers leave out.

Book a call