Skip to content

How campaign sales is calculated

Campaign sales is the number that matters most: it’s what Analytics reports as your campaigns’ performance, and it’s the same number your plan’s usage cap is measured against. Both readings use the same formula.

For every order line a campaign discounted:

line net = max(0, unit price × quantity − line discount − refunded amount)

Campaign sales is the sum of line net across every attributed line, converted to your store’s currency.

  • Unit price is the variant’s price before any discount.
  • Line discount is every discount allocation on that line, including a separate discount code the shopper also happened to use if it landed on the same line. Stack a code on top of your campaign and campaign sales drops, because the line’s net revenue really is lower.
  • Refunded amount is whatever was refunded on that specific line. A full refund brings that line’s contribution to zero, retroactively — so a past period’s total can drop after the fact, not just grow.

A line counts toward a campaign only when the discount applied to it carries a marker the app writes into the discount at checkout — never by matching campaign names, and never by checking whether the campaign is currently active, scheduled, or has since been deleted. A campaign that discounted an order in June still gets credit for it in June’s numbers even if you delete the campaign in July.

The direct consequence: orders placed before the app was installed are never counted, however the products and prices line up — there was no marker to write yet.

  • Shipping and taxes — the formula only ever looks at order line items, never shipping lines or tax lines.
  • Lines a campaign didn’t discount — an order can mix a discounted line with an untouched one; only the discounted line’s net revenue counts, however large the rest of the order is.
  • Cancelled orders — excluded entirely, everywhere.

Analytics and your plan’s usage cap read the same orders slightly differently:

Analytics Plan quota
Order status counted Any status, including pending and unpaid Only paid or partially refunded
Pending orders Included right away Shown separately, not yet deducted from your cap
Currency Your store’s current currency Converted to USD for billing

That’s why a burst of new, unpaid orders can move Analytics before it moves your quota — the quota waits for the money to actually settle. See Plans and limits and Packs and quotas.