Shopify Sales by Discount Report Includes Compare at Price
Table of Contents
- Introduction
- The Architectural Gap: Why Compare at Price is “Invisible” to Reports
- Analyzing the Impact on Financial Reporting
- How to Make Shopify Sales by Discount Reports Reflect Compare at Price Values
- Implementing the Solution Safely
- Choosing the Right Nextools App for Your Reporting Needs
- Technical Deep Dive: Metafields vs. Hardcoded Prices
- The Script-to-Functions Migration Path
- Measuring Success: Metrics That Matter
- Best Practices for Discount Reporting Accuracy
- Nextools Shopify App Suite (Quick Links)
- Conclusion
- FAQ
Introduction
The disconnect between storefront display and backend analytics is a persistent friction point for high-volume Shopify Plus merchants. When a marketing team sets a “Compare at price” to show a strike-through discount on a product page, they often expect those “savings” to appear in the “Sales by discount” report. However, Shopify’s core architecture treats a “Compare at price” as a static metadata field and the “Price” as the actual transaction value. This means your sales reports show the reduced price as the gross revenue, with zero attributed discounts, effectively masking the true cost of your promotions.
At Nextools, we specialize in solving these architectural hurdles through Shopify Functions and Checkout Extensibility. We understand that for agencies and developers supporting complex stores, “good enough” reporting isn’t an option. Distorted gross sales figures lead to incorrect tax calculations, skewed ROI data for marketing campaigns, and a lack of clarity in multi-channel performance.
This post is designed for Shopify Plus merchants, technical leads, and e-commerce agencies who need to bridge the gap between psychological pricing and financial reporting. We will demonstrate how to move beyond basic theme hacks and leverage the Nextools Shopify App Suite to ensure your Shopify sales by discount report includes compare at price data—or at least the functional equivalent that satisfies your finance team.
Our thesis follows the Nextools Playbook: we clarify your reporting constraints, confirm the limits of native Shopify logic, choose a durable Functions-first approach to pricing, and implement a safe, measurable rollout strategy.
The Architectural Gap: Why Compare at Price is “Invisible” to Reports
To solve the reporting issue, we must first understand the database logic. In the Shopify ecosystem, there is a hard distinction between a “Price Change” and a “Discount Application.”
The “Price Change” Logic (Compare at Price)
When you use the “Compare at price” field in the Shopify Admin, you are manually changing the price of the variant. The “Compare at price” is simply a reference label used by the theme’s Liquid or Hydrogen frontend to render a strike-through.
When an order is placed:
- Shopify records the
pricefield as thegross_salesvalue. - Because the transaction happened at that price, no discount is technically “applied” at checkout.
- The “Sales by discount” report looks for
discount_applications. Since the price was already low before it hit the cart, no application exists.
The “Discount Application” Logic (Codes and Automatic Discounts)
Conversely, when you use a Discount Code or an Automatic Discount:
- The product
priceremains at its original high value (e.g., $100). - A
discount_applicationis created at checkout (e.g., -$20). - The report identifies the $100 as
gross_salesand the $20 asdiscounts, resulting innet_salesof $80.
The merchant’s goal is often to have the customer experience of the “Compare at price” (visual strike-through on the collection page) but the reporting accuracy of a “Discount Application.” This is particularly critical for stores migrating from legacy Shopify Scripts to Shopify Functions.
Analyzing the Impact on Financial Reporting
If your shopify sales by discount report includes compare at price data only through manual theme modifications, your finance team is likely seeing “deflated” gross sales. Here is how this impacts your business:
Gross Revenue Distortion
If you sell 1,000 units of a product that normally costs $100 for a sale price of $70 using “Compare at price,” your reports will show $70,000 in Gross Sales. If you had used a $30 discount code, your reports would show $100,000 in Gross Sales and $30,000 in Discounts. While the Net Sales ($70,000) are the same, the “Gross” figure is vital for calculating marketing efficiency (ROAS) and understanding the depth of your promotional activity.
Marketing Attribution Failure
Most “Sales by discount” reports are used to track which campaigns are working. If half of your sales come from “Compare at price” markdowns and the other half from “BFCM20” discount codes, your reports will suggest the “BFCM20” code is your only active promotion. You lose visibility into which marked-down products are actually driving the most “saved” value for customers.
Scaling and Multi-Channel Complexity
As you expand into Shopify Markets, the complexity grows. Currency conversion is applied to the final price. If you are using “Compare at price” to manage international margins, the reporting becomes even more opaque. A Functions-based approach, which we advocate for at Nextools, allows you to handle these calculations dynamically at the checkout level.
How to Make Shopify Sales by Discount Reports Reflect Compare at Price Values
Since native Shopify reports won’t change their fundamental logic overnight, merchants must change how they apply the discount to ensure it gets tracked. The most durable way to do this is by shifting the logic from the Product page to the Checkout via Shopify Functions.
1. Clarify the Goal and Constraints
First, we define what success looks like. Do you need the strike-through price to show on the product page? Yes. Do you need the “Sales by discount” report to show a line item for these savings? Yes.
The constraint is that Shopify Functions currently don’t “know” what the “Compare at price” was unless we pass that data into the cart or store it in a way the Function can access (like a Metafield).
2. Confirm Platform Capabilities (Shopify Functions)
With the introduction of Checkout Extensibility, Shopify Plus merchants can use “Discount Functions.” A Discount Function can look at the items in the cart and decide to apply a discount based on custom logic.
Instead of setting a manual “Sale Price” in the price field, we keep the price high and store the “Target Sale Price” in a Metafield. We then use a tool like SupaEasy to create a Function that:
- Identifies if a product has a “Target Sale Price” in its Metafields.
- Calculates the difference between the current price and that target.
- Applies an automatic discount to the line item.
By doing this, the discount is “applied” at checkout, meaning it now appears in the “Sales by discount” report.
3. Choose the Simplest Durable Approach
At Nextools, we believe in avoiding “brittle theme hacks.” You could use JavaScript to “fake” a discount at checkout, but that is prone to breaking and doesn’t work for server-side calculations.
The engineering-minded workflow suggests using a combination of Metafields and a Cart Transform or Discount Function.
- Cart Transform: Allows you to change the price of an item in the cart.
- Discount Function: Applies a named discount (e.g., “Seasonal Markdown”) to the cart.
If you use SupaEasy, you can generate these Functions without writing custom Rust or TypeScript code. This ensures that the logic is processed on Shopify’s infrastructure, maintaining high performance and reliability.
Implementing the Solution Safely
When moving your promotional logic from “Compare at price” to “Functions-based discounts,” a staged rollout is essential.
Phase 1: Data Preparation
You must sync your “Compare at prices” to a custom Metafield. This ensures that the Discount Function has a source of truth to calculate the “savings.” You can use SupaEasy or AttributePro to manage how data is passed into the checkout process.
Phase 2: Development Store Testing
Never deploy pricing logic directly to a live store. Create a sandbox or development store.
- Install your discount logic.
- Add items to the cart.
- Verify that the strike-through appears.
- Complete a test transaction.
- Wait 1-2 minutes for Shopify Analytics to update.
- Check the “Sales by discount” report to see if the “Compare at price” savings are now listed as a discount.
Phase 3: Measuring Impact
Once live, monitor your checkout completion rates. Sometimes, moving from a “pre-discounted” price to a “discount applied at checkout” model can change customer behavior. Use SupaElements to add a “You saved $X.XX” message in the checkout UI to reinforce the value proposition.
Choosing the Right Nextools App for Your Reporting Needs
Depending on your specific checkout logic, different apps in our Shopify App Suite can help bridge the reporting gap.
For Custom Discount Logic: SupaEasy
If you want to migrate from Shopify Scripts to a system where every price reduction is tracked in your reports, SupaEasy is the primary tool. It allows you to create complex discount rules that translate “Compare at” values into functional discounts.
- Decision Criteria: Use this if you need “Compare at” prices to behave like automatic discounts for reporting purposes.
For Stacking Discounts: Multiscount
If you are worried that these “Compare at” discounts will conflict with your other promo codes (like “WELCOME10”), Multiscount helps manage stackable and tiered discounts. It ensures that the reporting doesn’t become a mess of overlapping rules.
- Decision Criteria: Use this if you run multiple concurrent promotions alongside your markdown items.
For Checkout Validation: Cart Block
To ensure your discounts don’t lead to unprofitable orders (e.g., a customer using a 50% code on a already-marked-down “Compare at” item), Cart Block can prevent specific combinations from proceeding to checkout.
- Decision Criteria: Use this to protect your margins when implementing broad discount-based reporting.
Technical Deep Dive: Metafields vs. Hardcoded Prices
A common question we receive at Nextools is: “Why not just keep using Compare at Price and use a reporting app to fix the data later?”
The answer lies in the “Source of Truth.” If your reporting app is trying to “recalculate” what the discount should have been by looking at historical product data, it will eventually fail. Products change prices, variants are deleted, and exchange rates fluctuate.
By using a Shopify Function to apply the discount at the moment of sale, the data is baked into the order record itself. This makes your Shopify sales by discount report natively accurate without needing external spreadsheets or complex BI tools to “reverse engineer” your sales performance.
Handling Shopify Markets and Currency
One of the major “gotchas” with the shopify sales by discount report includes compare at price issue is currency.
- If you set a Compare at Price of $100 and a Price of $80 in USD, Shopify calculates the conversion for $80.
- If you use a Discount Function to apply a 20% discount on a $100 item, Shopify calculates the 20% after the conversion of the $100 base price.
This ensures that your “Sales by discount” report reflects the correct local currency value, making your international financial reporting much cleaner.
The Script-to-Functions Migration Path
For many Plus merchants, the “Compare at price” reporting issue was previously handled by Ruby Scripts in the Script Editor. As Shopify moves toward Sunsetting Scripts in favor of Functions, migrating this logic is a priority.
At Nextools, we see this as an opportunity to clean up technical debt. Instead of a messy Ruby script that is hard to debug, a Function created via SupaEasy is modular, testable, and integrates directly with Shopify’s new Analytics engine.
Note on Migration: When migrating, ensure your Function uses the
DiscountApplicationStrategy. If you want your “Compare at” logic to be the “base” discount that other codes can stack on top of, you need to configure the “combines with” settings carefully within the Shopify Admin.
Measuring Success: Metrics That Matter
Once you have successfully implemented a system where your shopify sales by discount report includes compare at price data (via the Discount Function method), you should track the following:
- Gross Sales Transparency: Do your Gross Sales now reflect the “pre-sale” retail value?
- Discount Depth: Can you now see the average percentage of discount being given across all markdowns?
- AOV (Average Order Value): Does the visual clarity of the discount at checkout (provided by SupaElements) improve the AOV?
- Return Rate by Discount Type: Do products bought via “Compare at price” (now tracked as a discount) have higher return rates than full-price items?
By having this data in the native “Sales by discount” report, you can finally perform cohort analysis on your promotional strategies.
Best Practices for Discount Reporting Accuracy
To maintain a clean “Sales by discount” report, follow these Nextools-recommended practices:
- Naming Conventions: Give your Discount Functions clear names like “MSRP_Markdown” or “Seasonal_Clearance.” These names will appear as the “Discount Name” in your Shopify reports, making it easy for non-technical stakeholders to understand the data.
- Avoid “Zero-Dollar” Compare at Prices: Ensure your variants don’t have a Compare at price of $0.00 or an empty string if you are using automated logic, as this can cause division-by-zero errors in some custom Functions.
- Sync with Marketing: Ensure your paid ad teams know that “Gross Sales” will now look higher. If they are optimized for “Gross ROAS,” their targets may need to be adjusted to reflect the new reporting reality.
- Use Staging Environments: Always test how a new discount logic affects the “Sales by discount” report in a sandbox before pushing to production.
Nextools Shopify App Suite (Quick Links)
To implement these advanced checkout and reporting strategies, explore our full range of tools:
- SupaEasy — Shopify Functions generator + Script migration + AI
- SupaElements — Checkout + Thank You + Order Status customization
- HidePay — Hide/sort/rename payment methods
- HideShip — Hide/sort/rename shipping methods + conditional rates
- Multiscount — Stackable + tiered discounts
- Cart Block — Checkout validator (block/validate orders; anti-bot/fraud)
- AutoCart — Gift with purchase + auto add/remove + companion products
- ShipKit — Dynamic shipping rates (rule-based)
- Hook2Flow — Send webhooks to Shopify Flow (automation)
- AttributePro — Cart attributes + line properties (conditional logic)
- Formify — Custom checkout forms (drag & drop)
- CartLingo — Checkout translator (manual + AI)
- NoWaste — Discount & promote expiring items
- Hurry Cart — Countdown cart urgency timer
- Fatturify — Sync invoices with Fatture in Cloud (Italy)
- PosteTrack — Tracking for Poste Italiane
Conclusion
The quest to have a shopify sales by discount report includes compare at price is essentially a quest for financial truth. While Shopify’s native “Compare at price” field is excellent for storefront psychology, it falls short for backend accounting. By pivoting to a Functions-first approach—where “Compare at” values are transformed into actual tracked discounts—merchants gain the visibility they need to scale profitably.
At Nextools, our engineering-led approach helps you navigate these platform limits safely. Remember our playbook:
- Clarify Constraints: Understand that “Compare at price” is a label, not a transaction record.
- Confirm Limits: Acknowledge that native reports only track
discount_applications. - Choose the Durable Solution: Use SupaEasy to convert markdowns into tracked discounts via Shopify Functions.
- Implement Safely: Use Metafields and sandbox testing to avoid pricing errors.
- Measure and Iterate: Use your newly accurate “Sales by discount” reports to refine your promotional calendar.
Ready to fix your reporting and take full control of your checkout logic? Explore the Nextools Shopify App Suite today and start building a future-proof Shopify Plus store.
FAQ
Does Shopify Plus allow me to change how the Sales by Discount report works?
You cannot directly edit the logic of Shopify’s native reports. However, by using Shopify Functions to change how discounts are applied (moving from “Compare at” price changes to “Discount Applications”), you can ensure the data flows into the existing reports correctly. This requires a Plus plan to access the full power of Checkout Extensibility and Functions.
Will using a Discount Function for Compare at prices slow down my checkout?
No. Shopify Functions are executed on Shopify’s global infrastructure with strict execution time limits (usually under 200ms). Using a well-optimized app like SupaEasy ensures your pricing logic runs at the edge, providing a seamless experience for the customer while securing your reporting data.
Can I test these reporting changes in a development store for free?
Yes. All Nextools apps, including SupaEasy and Multiscount, offer free plans for Development and Shopify Plus Sandbox stores. This allows you to verify that your “Compare at” savings are appearing in the “Sales by discount” report before committing to a paid plan on a live store.
How do I handle Script-to-Functions migration for my pricing reports?
The transition involves moving your Ruby Script logic into a Discount Function. Instead of the script modifying the line item price (which often hid discounts from reports), the Function should apply a “Fixed Amount” or “Percentage” discount. This ensures the discount is explicitly tracked in Shopify Analytics. Nextools provides consulting and tools like SupaEasy to simplify this migration.