# E-commerce Metrics Reference

> Standard definitions for e-commerce reporting metrics.
> Use these as defaults in the glossary — override only with explicit stakeholder agreement.

---

## Revenue & Margin Metrics

### Gross Revenue
**Definition:** Total sales value before any deductions. The top line.
**Additivity:** Fully additive — sum across products, channels, brands, time

### Net Revenue
**Definition:** Gross revenue minus returns/refunds and platform fees/commissions
**Common conflict:** Marketing teams often exclude platform fees from their "net revenue" definition; Finance includes them. Agree on one definition and store it consistently.
**Additivity:** Fully additive

### COGS (Cost of Goods Sold)
**Definition:** Direct cost of producing or purchasing the goods sold in the period
**Includes:** Product cost, inbound shipping, import duties
**Excludes:** Marketing, fulfilment, overheads (unless agreed otherwise)
**Additivity:** Fully additive

### Gross Profit / Gross Margin
**Definition:** Net revenue minus COGS
**Additivity:** Gross profit = fully additive; gross margin % = non-additive (store components)

### Contribution Margin I (CM I)
**Definition:** Gross profit minus variable marketing costs (primarily ad spend)
**Additivity:** CM I amount = fully additive; CM I % = non-additive

### Contribution Margin II (CM II)
**Definition:** CM I minus variable fulfilment and logistics costs
**Additivity:** CM II amount = fully additive; CM II % = non-additive

---

## Advertising Metrics

### Ad Spend
**Definition:** Total spend on paid advertising in a period
**Additivity:** Fully additive — sum across campaigns, channels, brands, time

### Attributed Revenue
**Definition:** Revenue credited to advertising within the attribution window
**Critical conflict:** Attribution windows differ by platform — Amazon uses 14-day; Meta uses 7-day click / 1-day view; Google varies. Do NOT compare ACOS across platforms without normalising.
**Additivity:** Fully additive (the revenue amount); but cross-platform totals are not comparable

### ACOS (Advertising Cost of Sale)
**Definition:** Ad spend / attributed revenue × 100
**Additivity:** NON-ADDITIVE — do not sum ACOS across campaigns. Store ad_spend and attributed_revenue separately.
**Example of wrong aggregation:** Average of campaign ACOS ≠ Total ad spend / Total attributed revenue

### TACOS (Total Advertising Cost of Sale)
**Definition:** Ad spend / total revenue (not just attributed revenue) × 100
**Purpose:** Measures true advertising efficiency including organic revenue
**Additivity:** Non-additive — store components

### ROAS (Return on Ad Spend)
**Definition:** Attributed revenue / ad spend
**Additivity:** Non-additive — store components

---

## Inventory Metrics

### Units on Hand
**Definition:** Number of units physically available in a warehouse or FBA node at a point in time
**Additivity:** SEMI-ADDITIVE — sum across products and warehouses at a given date; do NOT sum across dates (use end-of-period snapshot)
**Fact type:** Periodic snapshot (end-of-day recommended)

### Days of Cover (DOC)
**Definition:** Units on hand / average daily sales rate
**Additivity:** NON-ADDITIVE — derive from units on hand and sales data
**Use:** Early warning for stockout risk

### Stockout Rate
**Definition:** Percentage of days in a period where a SKU had zero units available
**Additivity:** Non-additive — store days_out_of_stock and total_days separately

### Sell-Through Rate
**Definition:** Units sold / units received in a period
**Common conflict:** Denominator is sometimes units available (including opening stock) rather than units received. Agree on one.
**Additivity:** Non-additive — store numerator and denominator separately

---

## Returns Metrics

### Return Rate (Units)
**Definition:** Units returned / units sold in the same period
**Conflict:** Some teams use units shipped (not invoiced) as denominator — different when there are fulfilment delays
**Additivity:** Non-additive — store units_returned and units_sold separately

### Refund Rate (Revenue)
**Definition:** Refund amount / gross revenue in the same period
**Additivity:** Non-additive — store amounts separately

---

## Customer Metrics (DTC only — not available for marketplace orders)

### Customer Lifetime Value (LTV)
**Definition:** Total revenue a customer generates over their relationship
**Note:** For Amazon orders, customer is anonymised — LTV analysis only possible for DTC channels
**Additivity:** Sum across customers = total cohort revenue. Average LTV = non-additive (store sum and count).

### Repeat Purchase Rate
**Definition:** Percentage of customers who placed more than one order in a period
**Additivity:** Non-additive — store first_time_customers and repeat_customers counts separately

### Average Order Value (AOV)
**Definition:** Revenue / number of orders
**Additivity:** Non-additive — store revenue and order count separately

---

## Modelling notes for e-commerce

- Returns must be stored in a separate fact table, not netted against orders — this preserves the ability to analyse return rates, reasons, and margin impact independently
- ACOS and all ratios must never be stored as facts — always store the components (ad_spend, attributed_revenue) and derive the ratio in the BI layer
- Inventory must be a periodic snapshot fact, not a transaction fact — daily end-of-day snapshots are standard
- Amazon customer identity is unavailable — design the Customer dimension for DTC only; use a degenerate customer key on Amazon fact rows
- Multi-brand requires Brand as a conformed dimension from day one — otherwise cross-brand P&L is impossible
- Attribution window differences between Amazon, Meta, and Google mean attributed revenue figures are not directly comparable — document this prominently in the glossary
