Shopify Discount Code Performance: What Did Your BFCM Discounts Really Cost?
The short answer: to measure Shopify discount code performance, count the orders that used each code, then work out each code's net sales, average order value (AOV) and discount as a share of gross sales. A code that brings lots of orders at a low AOV and a high discount % can cost you more than it earns. Check this on your pre-Black Friday promotions now, so you know which codes deserve the spotlight from 27 November.
This guide shows you how to do that in Google Sheets with SyncRange, using the discount fields Shopify already records on every order. If you'd rather not build it yourself, the Discounts tab in our free BFCM reporting template does it for you.
Why "orders per code" isn't enough
Shopify's admin tells you how many times a code was used. That's a start, but it doesn't tell you what the code cost or what kind of order it brought in. For each code you want four numbers:
| Metric | How to work it out | What it tells you |
|---|---|---|
| Orders | Orders where the code appears | Reach of the offer |
| Net sales | Gross sales − discounts − returns on those orders | What you actually kept |
| AOV | Net sales ÷ orders | Whether the code pulls basket size up or down |
| Discount % of gross | Discounts ÷ gross sales on those orders | The real depth of the offer |
Put them side by side and the trade-offs show up. The table below is made-up example data, not real store figures.
| Example data | Orders | Net sales | AOV | Discount % of gross |
|---|---|---|---|---|
| BF30 (30% off sitewide) | 400 | $24,000 | $60 | 30% |
| SPEND150 ($25 off orders over $150) | 120 | $19,800 | $165 | 13% |
| No code | 600 | $48,000 | $80 | 0% |
On these example numbers, BF30 brings more orders, but SPEND150 gives away far less per dollar of sales and lifts AOV above the no-code baseline. Neither is automatically "better". The point is that you can only make the call when you see all four numbers together.
Where Shopify records discounts: line level vs order level
Before you build anything, it helps to know that Shopify stores discounts in two places, and SyncRange exports both. Every column below is in the Shopify data reference.
- Line-level (product) discounts apply to specific products or collections, such as "20% off the Winter collection". They're allocated to individual lines. On the Line Items tab, Discount Amount is the line-level discount on that line, and Discount Amount Breakdown splits it per discount, in the same order as that line's Discount Codes Applied.
- Order-level discounts apply across the whole order, such as "$25 off orders over $150". On the Orders tab, Order Level Discount Codes lists them, Order Level Discount Amounts (JSON) gives the amount for each code in the same order, and Order Level Discount Total adds them up.
And the totals:
- Orders > Discounts is the order's total discount, line-level plus order-level.
- Orders > Discount Codes Applied lists every code or title on the order (both levels). Manual Discount Codes and Automatic Discount Titles split codes customers typed from automatic discounts.
- Sales Metrics > Gross Sales, Discounts, Returns and Net Sales follow Shopify's definitions, one row per order, so they're the easiest base for AOV and discount %.
The gotcha: on the Line Items tab, Total Price is the line total after line-level discounts only. Order-level discounts are not subtracted; they sit in Order Discount Amount (the line's prorated share). If you add up line totals for orders that used an order-level code, you'll overstate their sales. Use Sales Metrics or the Orders tab for order totals. Configuring Shopify exports explains how refunds and discounts flow through each tab.
What you need
- A Shopify store and a SyncRange account. Start free, no credit card required, or install SyncRange from the Shopify App Store.
- A Google Sheet: your own, or a copy of the BFCM template.
- One Shopify export with the Orders, Sales Metrics and Discounts tabs (add Line Items if you want line-level detail).
Step by step: discount code performance in Google Sheets
Step 1: Connect Shopify and your sheet
Connect your Shopify store (Connecting Your Shopify Store), then add your Google Sheet as a destination (see Configuring Google Sheets). If you're using the template, make a copy first and pick that copy.
Step 2: Create the Shopify export
Create a Shopify export to the sheet (Configuring Shopify Exports) and tick these tabs and columns:
- Orders: Order ID, Order Date, Currency, Discounts, Gross Price, Discount Codes Applied, Manual Discount Codes, Automatic Discount Titles, Order Level Discount Codes, Order Level Discount Amounts (JSON), Order Level Discount Total.
- Sales Metrics: Order ID, Order Date, Gross Sales, Discounts, Returns, Net Sales.
- Discounts: Discount Code, Discount Title, Status, Discount Value Type, Discount Value, Minimum Value, Starts At, Ends At, Code Used Count. This tab is a full snapshot of your discount catalog on every run (the date range doesn't apply).
- Line Items (optional): Order ID, Discount Codes Applied, Discount Amount, Discount Amount Breakdown, Order Discount Amount, Total Price.
Set the date range to a rolling preset such as Last 90 days and data handling to Replace. Run it once, check the tabs fill, then set a schedule. The free plan syncs daily and lets you refresh manually; higher plans can sync more often (see pricing), which helps on Black Friday itself.
Step 3: Build a helper tab
Never add columns inside the tabs SyncRange writes to, because Replace mode rewrites them on every run. Instead, create a tab called calc_Codes that reads from them:
- A: Order ID, B: Order Date, C: Discount Codes Applied, copied from the Orders tab with
=ARRAYFORMULA(...)references. - D: Gross sales, E: Discounts, F: Net sales, looked up from Sales Metrics by Order ID, for example
=ARRAYFORMULA(IFERROR(VLOOKUP(A2:A, {SalesMetrics!A2:A, SalesMetrics!F2:F}, 2, FALSE))).
Column letters here are examples. Point them at wherever your columns landed (the template looks columns up by header name, so order doesn't matter there).
Step 4: Count orders and sales per code
List your codes in a summary tab (you can pull the list from the Discount Code column of the Discounts tab, or type the ones you care about). For a code in A2, match it as a whole item in the comma-separated list, so SAVE10 doesn't also count SAVE100:
- Orders:
=SUMPRODUCT(REGEXMATCH(","&SUBSTITUTE(calc_Codes!C2:C," ","")&",", "(?i),"&SUBSTITUTE(A2," ","")&",")*1) - Net sales: the same match multiplied by
calc_Codes!F2:F, insideSUMPRODUCT. Do the same with column D for gross sales and column E for discounts. - AOV: net sales ÷ orders.
- Discount % of gross: discounts ÷ gross sales.
- Share of orders: orders ÷ all orders in the window.
To limit it to a date window (say the week before Black Friday, or BFCM itself), multiply by (calc_Codes!B2:B>=start)*(calc_Codes!B2:B<=end). If a code contains regex characters such as + or ., escape them or match on exact text instead.
Add a "No code" row (orders where column C is blank) as your baseline AOV.
Step 5: Handle stacked codes honestly
When a customer uses two codes on one order, that order counts under both codes, and the order's Discounts total covers both. That's fine for orders and AOV, but it means the per-code discount figures overlap. If stacking matters for your store:
- For order-level codes, use Order Level Discount Amounts (JSON), which gives the amount for each code in Order Level Discount Codes order.
- For line-level codes, use Discount Amount Breakdown on Line Items, which splits each line's discount per code.
The template's Discounts tab keeps it simple: stacked codes share the order's total discount, and the tab says so in its notes.
Step 6: Add the catalog details
Join the summary to the Discounts tab on Discount Code to show Discount Value Type, Discount Value, Minimum Value, Status and Ends At next to each code's results. One caution: Code Used Count is the lifetime count for that code, not just the dates you're looking at, so label it that way.
Step 7: Chart it
Three charts tell the story: a bar chart of orders by code, a bar chart of net sales by code, and a scatter of AOV against discount % of gross. Codes towards the top left (high AOV, low discount %) are the ones worth a closer look. The template's Discounts tab already has all three, plus totals for the share of orders with a code, AOV with and without a code, and the discount rate on orders with a code.
Compare codes before Black Friday, not after
Black Friday is Friday 27 November 2026. You have the next ten days to use what's already in your data:
- Run the comparison on your last 90 days. Any codes from October or early November (welcome codes, email codes, early-access offers) show how your customers respond to each type of offer.
- Compare offer types, not just codes. Group codes by Discount Value Type (percentage, fixed amount, free shipping) and by whether they have a Minimum Value. Check whether threshold offers lift AOV against your no-code baseline in your data.
- Check last year's BFCM codes. Run a one-time export of last year's window (our year-over-year guide shows how) and run the same comparison.
- Check the catalog. On the Discounts tab, confirm your Black Friday codes have the right Starts At, Ends At and Status before the day.
- Push the winners. Feature the codes that hold AOV and discount % where you want them in your emails, ads and homepage banners.
Then, during BFCM, re-sync as often as your plan allows and watch the same table. If one code is pulling AOV well below your baseline, you'll see it while there's still time to change the offer.
Discount codes across several stores or markets
If you run more than one Shopify store, or one store selling into several markets, look at code performance per store as well as overall.
- One export per store. Each Shopify export reads one store, so the simplest setup is one sheet (or one copy of the template) per store.
- One view across stores. Data Blends can pull several connected stores into shared tabs with the same column names, so you can compare a code that runs in every store.
- BigQuery for data teams. Send Orders and Sales Metrics to BigQuery with Shopify to BigQuery. The JSON columns (Discount Codes Applied (JSON), Order Level Discount Codes (JSON), Order Level Discount Amounts (JSON)) are made for parsing in SQL, so you can unnest codes per order with
JSON_VALUE_ARRAYinstead of splitting text. Our Shopify orders and line items to BigQuery guide covers the setup. - Currencies. Orders include Currency. Don't add up sales in different currencies; filter or split by currency first (the template's Settings tab has a store currency filter for this).
Optional: put ad spend next to your codes
If a code only runs in your Meta ads, its true cost is the discount plus the ad spend behind it. You can add that with a second export:
- Connect Meta and export the Insights (Campaigns) tab, which has Spend by campaign (see Configuring Meta exports and the Meta data reference).
- In your summary, put each code's net sales next to the spend of the campaign that promotes it.
The BFCM template is Shopify-only, so this goes in a tab you add yourself. For the maths, see how to calculate return on ad spend, or start with the Meta to Google Sheets workflow.
Frequently asked questions
How do I track discount code performance in Shopify? Export your Shopify orders with their discount codes and per-order sales into a spreadsheet, then count orders, net sales, AOV and discount % of gross for each code. In SyncRange, the Orders tab's Discount Codes Applied column and the Sales Metrics tab give you everything you need, and the BFCM template's Discounts tab does the maths.
What's the difference between line-level and order-level discounts? Line-level discounts apply to specific products and are allocated to those lines (Discount Amount on Line Items). Order-level discounts apply to the whole order (Order Level Discount Total on Orders). The Orders tab's Discounts column is the sum of both.
Why don't my line item totals add up to the order total? Line Items Total Price subtracts only line-level discounts. Order-level discounts sit in Order Discount Amount on each line and are not subtracted, so use the Orders or Sales Metrics tab for order totals.
How do I count an order that used two discount codes? Count it under both codes for orders and AOV. For the discount amount, either let the codes share the order's total discount (simple), or use Order Level Discount Amounts (JSON) and Discount Amount Breakdown to split it per code (exact).
Does Code Used Count show how many times a code was used on Black Friday? No. It's the lifetime count for that code. For a specific window, count orders from the Orders tab filtered by Order Date.
Do I need a paid plan? You can start on the free plan, no credit card required. It syncs daily with manual refresh; higher plans can sync more often, which helps if you want to watch codes during BFCM. See the pricing page for details.
Know what your codes cost before Black Friday
You've got about ten days to find out which offers bring in the orders you want. Set it up this week, and on Black Friday you'll be watching numbers you already trust.
- Get the free BFCM template (Discounts tab included): Make a copy, or read the template launch post for what's in every tab.
- Start free, no credit card required: Create your SyncRange account
- Prefer Shopify admin? Install SyncRange from the Shopify App Store
More on Shopify reporting: export Shopify orders to Google Sheets, the Shopify to Google Sheets workflow, SyncRange for Shopify and our other Google Sheets templates.
Related posts
- Free BFCM Reporting Template for Shopify (Google Sheets) Track hourly and daily BFCM sales, discounts, refunds, and year-over-year performance in a free Google Sheets template that updates from your Shopify store with SyncRange.
- How to Compare Shopify BFCM Sales Year Over Year in Google Sheets Compare Black Friday Cyber Monday with last year in Google Sheets by lining days up from Black Friday, not by calendar date. Pull last year’s Shopify data once and watch the refund timing gap.
- How to Export Shopify Orders to Google Sheets: Manual and Automated Methods Exporting your Shopify orders to Google Sheets can help you analyze sales, manage inventory, and keep financial records up to date.