How to set up ecommerce analytics that show real profit, not just revenue
Max Musing
Max MusingFounder and CEO of Basedash
· June 30, 2026

Max Musing
Max MusingFounder and CEO of Basedash
· June 30, 2026

Most ecommerce analytics tell you how much you sold but not how much you kept. Shopify shows gross sales, the ad platforms each claim their own revenue, and the profit on an order, after discounts, returns, payment fees, shipping, cost of goods, and acquisition spend, lives in no single tool. Useful ecommerce analytics means pulling those sources into one place and computing the numbers your platforms don’t: contribution margin, profit after ad spend, and new versus returning revenue.
If your DTC or online retail brand has outgrown Shopify’s built-in reports, this guide covers why platform-native reporting falls short, the data sources to connect, a profit framework many dashboards skip, where the data should live, and the metrics to define.
Shopify Analytics, Meta Ads Manager, and Google Ads each report a partial, self-interested view. They are fine for a quick read on traffic and sales, but they cannot tell you whether a brand is making money.
No single dashboard can tell you whether you are profitable. Spend, revenue, costs, and refunds have to come together in one model, with metrics you define yourself.
Before connecting anything, map each source to the data it is the authority for, so you never pull the same metric from two systems and get two answers.
| Source | What it is the authority for | Typical connection method |
|---|---|---|
| Shopify / WooCommerce / BigCommerce | Orders, line items, discounts, refunds, customers, fulfillment | Admin API or managed connector |
| Meta Ads, Google Ads, TikTok Ads | Ad spend, impressions, clicks, campaign metadata | Platform API or managed connector |
| Payment processor (Stripe, Shopify Payments) | Processing fees, payouts, chargebacks | Connector or platform export |
| Cost of goods (ERP, NetSuite, a spreadsheet) | Unit COGS, landed cost, supplier data | Connector, export, or manual table |
| Fulfillment (ShipBob, ShipStation, 3PL) | Pick-pack, shipping cost per order | API or CSV export |
| Email and SMS (Klaviyo, Attentive) | Owned-channel attributed revenue | Connector |
The commerce platform owns the order and the customer, ad platforms own spend, your COGS source owns unit costs, and the processor owns fees. Any profit metric needs at least three of these joined together, which is why no native dashboard can produce it.
The most useful thing ecommerce analytics can do is walk an order from gross revenue down to the profit you keep. Many brands stop at revenue or blended ROAS, but the number that should drive spend decisions sits further down in the five layers below.
| Layer | What it is | What it subtracts |
|---|---|---|
| Gross revenue | Order value at full price | Nothing |
| Net revenue | Revenue you recognize | Discounts, returns, refunds, taxes |
| Gross margin | Product profit | Cost of goods sold (COGS) |
| Contribution margin | Profit per order before marketing | Payment fees, shipping, pick-and-pack |
| Profit after ad spend | What acquisition leaves behind | Advertising and promotion |
Each layer changes the decision. Gross revenue tells you nothing about health. Net revenue exposes a discounting or returns problem. Contribution margin tells you whether a product or order is structurally profitable before you spend a cent acquiring the customer. Profit after ad spend, sometimes computed at the blended level as net revenue minus total marketing cost, tells you whether the business as a whole makes money.
A brand can grow gross revenue 40 percent and shrink profit after ad spend at the same time. That only shows up if your analytics carry every order through all five layers instead of stopping at the top.
The right architecture depends on how many sources you have and how much history you need.
Stay platform-native if you sell on one channel, run light paid spend, and mostly need revenue and traffic. Shopify’s reports plus an app or two are enough. Adding a warehouse here is overhead you will not use.
Move to a warehouse once profitability requires joining three or more sources, you want order history that outlives a tool’s retention window, or different teams keep arguing about whose number is right. A central store in BigQuery, Snowflake, Redshift, or Postgres becomes the single source of truth, with ELT connectors (Fivetran, Airbyte) syncing Shopify, ad platforms, and processors into it. This is the same threshold described in when to add a data warehouse.
Run a hybrid in the common middle ground: live-query Shopify for operational, near-real-time order monitoring, and use the warehouse for blended profitability and historical analysis. The tradeoffs between live queries, blending, and a warehouse are covered in how BI tools combine data from multiple sources.
The Shopify Admin API is rate-limited using a leaky-bucket model, so pulling large order histories means paginating and respecting throttles rather than one big extract (see the Shopify API rate limits docs). Managed connectors handle this for you, which is the main reason to use one instead of writing your own sync.
Define these once, in one place, so every report agrees. Vague labels like “revenue” are where dashboards diverge.
| Metric | Definition | Why it matters |
|---|---|---|
| Net revenue | Gross sales minus discounts, returns, and refunds | The only revenue figure worth tracking over time |
| AOV | Net revenue divided by orders | Detects discounting and bundle effects |
| Contribution margin | Net revenue minus COGS, fees, shipping, fulfillment | Whether an order is profitable before acquisition |
| MER | Total net revenue divided by total marketing spend | A blended, platform-agnostic efficiency check |
| New customer CAC | Ad spend divided by new customers acquired | The real cost of paid growth |
| CAC payback | Months for contribution margin to recover CAC | Whether acquisition is sustainable |
| Repeat purchase rate | Share of customers with two or more orders | The lever behind long-term profitability |
| Returning revenue share | Revenue from prior customers as a share of total | Separates real acquisition from base demand |
| Return rate | Refunded order value as a share of gross | A margin killer hidden in delayed refunds |
Two of these deserve emphasis. MER (marketing efficiency ratio) sidesteps attribution disputes by ignoring which platform claimed which sale and asking only whether total revenue justifies total spend. Splitting new versus returning revenue keeps a brand from celebrating “great ROAS” that comes from loyal customers buying again.
Ecommerce data has quirks that generic analytics advice misses.
You do not need a warehouse or a BI tool for every store. Stay with Shopify Analytics and a focused app when you sell on a single channel, run little or no paid acquisition, carry simple and stable margins, and need mostly revenue and traffic visibility. Once you start spending meaningfully on ads, selling across channels, or arguing about profitability, the gap between native reports and reality justifies building proper analytics.
A few categories fit different stages, and a fuller breakdown lives in the best ecommerce analytics tools compared.
The right choice follows the architecture decision above: platform-native for single-channel simplicity, purpose-built for Shopify-first brands, and warehouse-native once profitability spans many sources.
ROAS (return on ad spend) is reported per platform and counts only the revenue that platform claims, so the numbers double-count across Meta and Google. MER (marketing efficiency ratio) is blended: total net revenue divided by total marketing spend across all channels. MER avoids the attribution arguments and is harder to game, which is why many DTC teams treat it as the headline efficiency metric.
Start from the order’s net revenue (after discounts and refunds), subtract cost of goods sold, then subtract variable costs such as payment processing fees, shipping, and pick-and-pack. That gives contribution margin. Subtracting attributed or blended acquisition cost gives profit after ad spend. You need data from the commerce platform, your COGS source, the processor, and the ad platforms to compute it, which is why it cannot come from one dashboard.
Not always. A single-channel store with light ad spend can run on Shopify’s reports. You need a warehouse once profitability requires joining three or more sources, you want order history beyond a tool’s retention window, or teams disagree about whose numbers are right.
Each ad platform attributes conversions using its own window and view-through rules, and they all claim overlapping orders. Shopify records the actual order. Reconcile against Shopify as the source of truth for orders and revenue, and use blended metrics like MER instead of summing platform-reported conversions.
Attribute refunds back to the original order date, not the date the refund is processed. This keeps historical net revenue and contribution margin stable instead of shifting every time a late refund lands. Track return rate as its own metric, since it is a common and easily hidden drag on margin.
Written by

Founder and CEO of Basedash
Max Musing is the founder and CEO of Basedash, an AI-native business intelligence platform designed to help teams explore analytics and build dashboards without writing SQL. His work focuses on applying large language models to structured data systems, improving query reliability, and building governed analytics workflows for production environments.
Basedash lets you build charts, dashboards, and reports in seconds using all your data.