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.
Contribution per order, example
£9.10 of a £58.40 order is left after every cost
- Average order value £58.40
- Product cost −£24.50
- Returns −£4.10 Returns: dated to the original order, spread across all orders
- Shipping and packaging −£6.90
- Payment fees −£1.60
- Ad spend −£12.20 Ad spend: month's spend, all platforms, ÷ month's orders
- Contribution per order £9.10, 15.6% of order value
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.
| KPI | Formula | A good reading | The common mistake |
|---|---|---|---|
| Contribution per order | (Net revenue − product cost − returns − shipping and packaging − payment fees − ad spend) ÷ orders | Positive on repeat orders, and on first orders either positive or paid back by repeat orders within an agreed horizon | Leaving returns out because the refund lands next month. Date each return to its original order. |
| Average order value | Net revenue ÷ orders | Rising without the return rate rising with it | Taking revenue from one system and orders from another, such as storefront revenue over GA4 purchases |
| Conversion rate | GA4 purchases ÷ GA4 sessions | Read by device and landing page, against the same weeks last year | Dividing 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 cost | Acquisition ad spend ÷ first-time customers | Below what a new customer contributes over the agreed horizon | Dividing all spend by all orders, which counts returning customers as if the ads had won them |
| Repeat purchase rate | Customers with two or more orders in 12 months ÷ customers with at least one order in those 12 months | Steady or rising from one cohort to the next | Counting each guest checkout as a new person. Match customers on email address first. |
| Return rate | Value of items returned ÷ value of items sold, by the month the order was placed | Steady per product, with any outlier product looked into | Reading the latest month as final. Returns keep arriving for weeks, so recent months look better than they'll end. |
| New-customer revenue share | Revenue from first orders ÷ total net revenue | Matching the plan: high during a growth push, lower when the plan is retention | Judging 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.
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.
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.