TL;DR
Shopify is the system of record for which discount code each completed order used. Its Sales by discount codes report and the sales schema in ShopifyQL both answer the question, and ShopifyQL can split codes by campaign in one table. GA4 shows the discount names a shopper had applied at checkout. Klaviyo gets the order's codes on the app's Plus plan, and no ad platform gets any, so ROAS by code isn't a number Meta or Google Ads can give you. A store that wants codes inside GA4 can add one custom event, before pixels lock on November 16.
Key Takeaways
- Read codes in Shopify:
Analytics → Reports, Category filter set to Sales, then Sales by discount codes [1]. - Don't add up the report's Orders column. Combinable discounts put one order in several rows [1], and Shopify allows up to 5 product or order codes plus 1 shipping code on one order [4].
- Shopify's page describes a row's Total sales both as line-item sales and as the total of the orders, so check one code against a ShopifyQL query before you quote it [1].
- Run
FROM sales SHOW orders, net_sales, discounts GROUP BY discount_code, order_utm_campaignto see which codes travelled with which campaigns [2]. -
DURING bfcm2025selects last year's Black Friday weekend by name, so you can build and test the query now [3]. - GA4's
begin_checkout,add_shipping_infoandadd_payment_infofrom the app carry the applied discount names ascoupon; itspurchasecarries no coupon at order or item level. - To count completed orders per code in GA4, send a separately named event from a custom pixel. Never a second
purchase.
One order, six places to look
Here's where one Black Friday order's code shows up on a store running WeltPixel Conversion Tracking.
| Where you look | Does it record the code? | What you see |
|---|---|---|
| Shopify, Sales by discount codes | Yes, on every order | Rows by discount name, codes and automatic discounts alike [1] |
Shopify, ShopifyQL sales schema |
Yes, on every order |
discount_code, discount_method, order_utm_campaign and more [2] |
| GA4 checkout steps sent by the app | Yes, for visitors whose browser events reached GA4 | The discount names applied at that step, in coupon
|
GA4 purchase sent by the app |
No | Order value, items and transaction ID, no coupon |
| Klaviyo Placed Order (Plus plan) | Yes | The order's discount codes and total discounts |
| Meta, Google Ads, TikTok, Reddit, Pinterest, Snapchat, ChatGPT Ads | No | Discounted purchase value, no code |
The purchase value every destination receives is the order total with discounts already netted, the choice the tax and shipping article walks through. The discount is in the number. The code isn't.
That leaves one source of truth for "which codes drove sales": Shopify. GA4 can say which codes reached checkout, never which ones completed an order. No ad platform can segment your ROAS by code from these events, and Meta's standard pixel parameters don't include a coupon field at all [13].
How do you read Shopify's Sales by discount codes report?
From your Shopify admin, go to Analytics → Reports, set the Category filter to Sales and open Sales by discount codes [1]. Shopify's own description: it "displays your sales grouped by the name of the discount, such as the automatic discount name or discount code" [1]. The discount codes help page calls it the Sales by discount report [5].
The columns that matter for a sale review are Discount name, Discount method, Discount code, Automatic discount title, Discount amount, Orders and Total sales [1]. Set the date range to the sale weekend and sort by Orders.
Two points on Shopify's own page change how you read it.
"If you have combinable discounts on your store, then the same order might be included multiple times." [1] An order with a sitewide automatic discount and a newsletter code sits in both rows, so the Orders column summed down the page is larger than your order count. The more offers you stack for the weekend, the wider that gap; Shopify allows up to 5 product or order codes and 1 shipping code on one order [4].
"The sales value in this report includes only the total sales for the specific line items affected by the discount codes." [1] The same page defines the Total sales column as "the total sales of all orders that the discount was applied to" [1]. Shopify gives both readings, so use the row to compare codes with each other, and run the side-by-side check in the next section before you quote a code's revenue.
The report also includes pending, unpaid and canceled orders, and leaves out test orders [1]. Shopify's report page doesn't say which plans get it. The Starter plan page lists "sales reports", and the Basic plan page lists access to all reports [6][7].
Edge rows to expect after the weekend:
- Automatic discounts. They have no code, so they appear under the automatic discount's title [1]. Shopify allows up to 25 active automatic discounts at a time [4].
- Machine-made codes. Google's automated discounts arrive as Shopify discount codes, and the automated discounts article covers what that does to your reporting.
- Affiliate and influencer codes. Their rows are the start of a payout question, which the affiliate attribution article owns.
Which codes drove which campaigns?
Write it in ShopifyQL. Data explorations live at Analytics → Reports → New exploration [5], and the sales schema carries discount_code ("Promotional code entered by customer or applied automatically to receive the discount"), discount_method ("Automatic, Manual, Discount code, and Script") and order_utm_campaign ("UTM name of the campaign associated with the order") [2]. Group by two of them:
FROM sales
SHOW orders, net_sales, discounts
GROUP BY discount_code, order_utm_campaign WITH TOTALS
DURING bfcm2025
ORDER BY net_sales DESC
DURING bfcm2025 is a named range Shopify defines as "the BFCM range for the specified year" [3], so you can test the query on last year's weekend today and swap the year once this one is over. orders "counts each order one time within the selected sales, even when the order contains multiple items" [2]. Swap discount_code for discount_method to see how much of the weekend ran on codes compared with automatic discounts.
Shopify doesn't say whether net_sales grouped by discount_code covers only the discounted lines or the whole order, or whether an order with two codes counts in both rows. Before you quote a figure, put one code's query result beside its row in Sales by discount codes and see which way it leans. For the weekend's order count, run FROM sales SHOW orders DURING bfcm2025 with no grouping, and don't add up grouped rows.
The campaign side of this table is the order's own campaign value with no attribution model applied. For first-click, last-click and linear credit, the campaign revenue article has the queries.
What does GA4 see?
The checkout steps, and only those. The app sends begin_checkout, add_shipping_info and add_payment_info to GA4 with a coupon parameter holding the discount names the shopper had applied at that step. Codes and automatic-discount names both go in, joined into one value when more than one applies. In Shopify's checkout data, a discount's title is "the customer-facing name of the discount", and it equals the code only when the type is DISCOUNT_CODE [8].
The GA4 purchase the app sends comes from the server and carries no coupon, at order or item level. Google defines coupon on the purchase event too [9], and the GA4 ecommerce events canon lists where it belongs in the spec.
Coverage is partial before you even start. Browser events respect Shopify's Customer Privacy API signals, so with the app's Respect Customer Privacy Settings on (the default), a visitor who declined analytics sends no checkout steps. Each step also has to be switched on in the app's event settings. To see the parameter, start a test checkout with a code and watch begin_checkout arrive in GA4 DebugView.
What GA4's "Order coupon" dimension shows for checkout events, Google doesn't document; its definition talks about "the coupon name or code that you specify for discounted items" [10]. Read the codes in DebugView or an exploration on the event itself. And GA4 item revenue from the app is pre-discount, which the article on money-losing products works through.
Klaviyo is the one destination that gets the code with the order. On the Plus plan, the app adds "Discount Codes" and "Total Discounts" to Placed Order, taken from the order as Shopify lists it, where a non-code discount appears under its title [14]. Klaviyo tracking on Shopify covers using them in flows.
If you want codes on completed orders in GA4
Add one custom event of your own. Leave the purchase alone.
GA4 "deduplicates purchase events with the same transaction ID" [11], and Google frames it as deduplicating "transactions from the same user". The app's GA4 purchase uses Shopify's numeric order ID and the shopper's GA4 client ID, or a stand-in identity when the browser never reached the app. Shopify doesn't document the format of the order ID a custom pixel sees, and an unbridged order puts the two purchases on different users. A second purchase from a custom pixel can double-count revenue, which the event deduplication article explains for the general case.
The safer shape:
- In
Settings → Customer events, add a custom pixel that subscribes tocheckout_completed[12]. - Read
discountApplications, keep the ones whose type isDISCOUNT_CODEas Shopify's own example does [8], and send an event with a name of your choosing, sayorder_discount_codes, carrying the codes and the order ID. If the pixel loads the Google tag, setsend_page_viewtofalsein its config, or it sends its own page view. - Register the code parameter as an event-scoped custom dimension, the step the custom dimensions article covers.
The newsletter signup article shows how custom pixels behave in their sandbox. Shopify's limits apply in full: "Adding and using custom pixels is unsupported by Shopify" [12], each pixel has its own customer privacy permission [12], and checkout_completed fires once per checkout, typically on the Thank you page or the first upsell page, and "isn't triggered at all" if that page fails to load [15]. Blocked visitors drop out, and so do visitors who declined, when the pixel's permission is set to Required [12]. The result is a count of completed orders per code in GA4, never a full one.
A new custom pixel is a Customer events change, and the Black Friday freeze calendar locks pixels on November 16. The BFCM readiness hub has the rest of the dates. The Shopify report needs no deadline; it reads the weekend after it's over.
FAQ
Does GA4 show which discount code was used on a Shopify order?
Not on the purchase sent by WeltPixel Conversion Tracking, which carries no coupon. The app's checkout events carry the discount names applied at checkout, for visitors whose browser events reached GA4. For completed orders by code, use Shopify's Sales by discount codes report [1].
Why don't my Sales by discount codes rows add up to my order count?
Combinable discounts put the same order into several rows [1]. Up to 5 product or order codes and 1 shipping code can apply to one order [4]. For the order count, run FROM sales SHOW orders DURING bfcm2025 with no discount grouping, where each order counts once [2], and don't sum grouped rows.
Can Meta or Google Ads report ROAS by discount code?
Not from the app's events. No ad platform receives a code, and Meta's standard pixel parameters have no coupon field [13]. Compare codes in Shopify, and keep campaign ROAS in the ad platforms.
Do automatic discounts show up in the report?
Yes. The report groups sales by discount name, "such as the automatic discount name or discount code" [1]. Group by discount_method in ShopifyQL to separate the two [2].
Keep the code where every order records it
WeltPixel Conversion Tracking sends each purchase's discounted value to GA4 and your ad platforms, sends GA4 the discount names applied at checkout, and passes the order's codes to Klaviyo on Plus. Shopify's own report holds the full code record for the weekend.
Sources
- Shopify Help Center, sales reports ("Sales by discount codes"), help.shopify.com/en/manual/reports-and-analytics/shopify-reports/report-types/default-reports/sales-report, accessed October 8, 2026
- Shopify Developer Docs, "sales" schema (API version 2026-10), shopify.dev/docs/api/shopifyql/latest/schemas/sales_revenue/sales, accessed October 8, 2026
- Shopify Developer Docs, ShopifyQL "SINCE, UNTIL, DURING", shopify.dev/docs/api/shopifyql/latest/syntax/since-until-during, accessed October 8, 2026
- Shopify Help Center, discount combinations, help.shopify.com/en/manual/discounts/discount-combinations, accessed October 6, 2026
- Shopify Help Center, discount codes, help.shopify.com/en/manual/discounts/discount-methods/discount-codes, and creating a data exploration, help.shopify.com/en/manual/reports-and-analytics/shopify-reports/report-types/custom-reports/create-custom-explorations, accessed October 6, 2026
- Shopify Help Center, Shopify Starter plan features, help.shopify.com/en/manual/intro-to-shopify/pricing-plans/plans-features/shopify-starter-plan, accessed October 6, 2026
- Shopify Help Center, Basic plan features, help.shopify.com/en/manual/intro-to-shopify/pricing-plans/plans-features/basic-shopify-plan, accessed October 6, 2026
- Shopify Developer Docs, Web Pixels API "checkout_started" (DiscountApplication), shopify.dev/docs/api/web-pixels-api/standard-events/checkout_started, accessed October 6, 2026
- Google for Developers, GA4 events reference, developers.google.com/analytics/devguides/collection/ga4/reference/events, accessed October 6, 2026
- Google for Developers, "Apply a discount to an ecommerce event", developers.google.com/analytics/devguides/collection/ga4/apply-discount, accessed October 6, 2026
- Google Analytics Help, transaction ID and purchase deduplication, support.google.com/analytics/answer/12313109, accessed October 6, 2026
- Shopify Help Center, managing custom pixels, help.shopify.com/en/manual/promoting-marketing/pixels/custom-pixels/manage, accessed October 6, 2026
- Meta for Developers, Meta Pixel reference (standard parameters), developers.facebook.com/docs/meta-pixel/reference, accessed October 6, 2026
- Shopify Developer Docs, REST Admin API Order resource (
discount_codes), shopify.dev/docs/api/admin-rest/latest/resources/order, accessed October 6, 2026 - Shopify Developer Docs, Web Pixels API "checkout_completed", shopify.dev/docs/api/web-pixels-api/standard-events/checkout_completed, accessed October 6, 2026