⚠️   Shopify Scripts will no longer be supported as of June 30, 2026  ⚠️   read the Shopify article 

Shopify Reports: Sales by Discount vs Compare at Price

Table of Contents

  1. Introduction
  2. The Core Conflict: Compare-At Price vs. Discount Codes
  3. Key Metrics in Shopify Sales Reports
  4. Why Technical Teams Prefer Functions-First Solutions
  5. Fixing the Reporting Gap: The “Better Compare At” Strategy
  6. Choosing the Right Tool from the Nextools Suite
  7. Implementing Safely: The Nextools Playbook in Action
  8. Understanding the “Sales by Discount Code” Report
  9. Advanced Considerations for Developers
  10. Conclusion and Action Plan
  11. Nextools Shopify App Suite (Quick Links)
  12. FAQ

Introduction

One of the most persistent frustrations for high-volume Shopify Plus merchants is the discrepancy between what the customer sees as a “sale” and what the finance team sees in the sales reports. When you apply a “Compare at Price” to a product, the storefront reflects a discount, but Shopify’s native sales reports treat this simply as a lower “Gross Sales” figure, rather than a “Discount” application. This creates a reporting vacuum where it becomes difficult to distinguish between organic price drops and strategic promotional activities.

At Nextools, we specialize in bridging these technical gaps through Shopify Functions and Checkout Extensibility. We understand that as merchants migrate from legacy Shopify Scripts to the more robust Shopify Functions architecture, maintaining reporting parity is a top priority. Whether you are an agency developer or a Plus merchant managing complex promotional stacks, understanding how Shopify reports sales by discount compare at price is essential for accurate attribution and financial forecasting.

This post is designed for Shopify Plus merchants, developers, and agencies who need to reconcile storefront “Compare at Price” logic with backend discount reporting. We will explore how to leverage the Nextools Shopify App Suite to gain better control over your checkout logic and reporting accuracy.

Our approach follows the Nextools Playbook: clarify your reporting constraints, confirm platform limits (specifically regarding Shopify Functions and Checkout Extensibility), choose the simplest durable approach—often a Functions-first solution—implement safely in a staging environment, and measure the impact on your data clarity.

The Core Conflict: Compare-At Price vs. Discount Codes

To understand why your reports might feel “off,” we must first look at how Shopify categorizes revenue data. In a standard Shopify Sales Report, “Gross Sales” is calculated as the Product Price multiplied by the Quantity.

How Compare-At Prices Affect Reports

When you set a “Compare at Price” of $100 and a “Price” of $70, Shopify records the sale at $70. In your reports, the “Discounts” column remains at $0.00 because, technically, the product’s base price was just $70 at the time of purchase. The $30 “saving” is visible on the storefront to the customer, but it is invisible to the reporting engine that tracks “Discounts.”

How Discount Codes Affect Reports

Conversely, if a product is priced at $100 and a customer applies a 30% discount code, the “Gross Sales” remains $100, but the “Discounts” column shows $30, resulting in a “Net Sales” figure of $70.

For a marketing team trying to calculate the Return on Ad Spend (ROAS) for specific promotions, having some “discounts” buried in Gross Sales (Compare-at) and others explicitly listed in the Discount column (Codes) makes cross-campaign analysis a manual nightmare.

Key Metrics in Shopify Sales Reports

To navigate this complexity, you must be fluent in Shopify’s reporting terminology. The platform recently updated several terms to better reflect modern e-commerce workflows, particularly around reversals and returns.

  • Gross Sales: Product price × quantity (before taxes, shipping, discounts, and returns). This includes pending and unpaid orders but excludes test and deleted orders.
  • Discounts: This equates to the line item discount plus the order-level discount share. Crucially, this metric tracks discounts created via discount codes or automatic discounts, not the compare-at price.
  • Sales Reversals: This covers all order adjustments with negative monetary value, including returns, cancellations, and edits.
  • Net Sales: The formula is simple: Gross Sales – Discounts – Sales Reversals.
  • Total Sales: Gross Sales – Discounts – Sales Reversals + Taxes + Duties + Shipping Charges + Fees.

When analyzing how Shopify reports sales by discount compare at price, the “Net Sales” figure is usually accurate, but the “Gross Sales” and “Discounts” figures will vary wildly depending on whether you used a compare-at price or a code.

Why Technical Teams Prefer Functions-First Solutions

For Shopify Plus merchants, the transition from Shopify Scripts to Shopify Functions isn’t just about performance; it’s about data integrity. Legacy Scripts could modify prices in ways that often confused reporting. Shopify Functions, when combined with Checkout Extensibility, provide a more structured way to handle logic.

At Nextools, we advocate for using SupaEasy to manage these logic layers. SupaEasy allows you to generate Shopify Functions that can transform cart attributes and apply discounts dynamically, ensuring that the logic running at checkout is the same logic being tracked in your analytics.

Platform Limits and Constraints

Before implementing a fix, you must recognize the constraints of the Shopify ecosystem:

  1. Shopify Plus Requirement: Most advanced checkout customizations, including the ability to run custom Shopify Functions or use the Cart Transform API effectively, require a Shopify Plus plan.
  2. Checkout Type: These solutions are designed for stores using Checkout Extensibility. If you are still on the legacy checkout.liquid, your reporting and customization options are severely limited.
  3. Functions Execution: Functions run on Shopify’s infrastructure (the “edge”). They must be performant and cannot make external API calls during the checkout process. This means all the data needed for a discount calculation (like metafields) must be available on the product or cart object.
  4. Markets and Currency: If you sell in multiple currencies via Shopify Markets, the logic for price transformations must account for the presentmentCurrencyRate.

Fixing the Reporting Gap: The “Better Compare At” Strategy

If your goal is to make “Compare at Price” savings appear in the “Discounts” column of your Shopify reports, you need to use a combination of Cart Transforms and Discount Functions. This is a common requirement for merchants who want a transparent “You Saved $X” line item throughout the checkout and in their final sales reports.

The Engineering Workflow

A durable solution involves three core components:

  1. Metafields for Original Price: Store the intended sale price (the lower price) in a product variant metafield.
  2. Cart Transform (Price Pinning): Use the Cart Transform API (specifically UpdateOperationFixedPricePerUnitAdjustment) to “pin” the price of the item in the cart back to its original higher “Compare at” price.
  3. Discount Function (Reporting Alignment): Apply a Shopify Discount Function that calculates the difference between the pinned “Compare at” price and the “Sale Price” stored in your metafield.

By “bumping” the price up and then applying a discount back down, you achieve two things:

  • The customer sees a clear discount line item in the checkout.
  • The Shopify Sales Report records the “Gross Sale” at the higher price and the “Discount” at the difference, giving your finance team the data they need.

For merchants who aren’t ready to write custom Rust or JavaScript functions from scratch, SupaEasy offers a “Functions Wizard” and AI-assisted generation to build these exact types of transformations without the overhead of custom app development.

Choosing the Right Tool from the Nextools Suite

Managing discounts and reporting isn’t just about the numbers; it’s about the customer experience and operational safety. Depending on your specific constraints, different apps in the Nextools Shopify App Suite can help.

Decision Checklist for Merchants

  • Do you need to migrate from Shopify Scripts to Functions? Use SupaEasy. It includes a Scripts Migrator and AI tool to help you replicate your legacy logic in the new Functions environment.
  • Do you need stackable or tiered discounts that report correctly? Use Multiscount. It allows for complex tiered pricing (Buy X Get Y, volume discounts) that Shopify’s native reporting can track more effectively than manual compare-at price changes.
  • Do you need to hide payment methods when specific discounts are active? Use HidePay. For example, if a high-margin discount is applied, you might want to hide high-fee payment methods like PayPal to protect your remaining margin.
  • Do you need to block orders that misuse discount combinations? Use Cart Block. This is essential for preventing “discount stacking” fraud during major sales like Black Friday.
  • Do you want to show custom “You Saved” badges or progress bars in the checkout? Use SupaElements. It allows you to add dynamic UI elements to the checkout that can reference the discount data generated by your Functions.

Implementing Safely: The Nextools Playbook in Action

We recommend a structured rollout for any change to your pricing or reporting logic. Changing how Shopify reports sales by discount compare at price can have significant downstream effects on your tax calculations and accounting software integrations.

Step 1: Clarify Goals and Constraints

Identify exactly which reports need to change. Is this for the marketing team to track ROAS, or for the finance team to track tax liabilities? Confirm if you are using Shopify Markets, as currency conversion affects how fixed-price adjustments are calculated.

Step 2: Confirm Platform Limits

Check your Shopify plan. If you aren’t on Plus, the “Better Compare At” strategy (using Cart Transforms) is not available. Also, check your existing discount stack. Shopify has limits on how many discounts can be applied or combined.

Step 3: Choose the Simplest Durable Approach

Avoid “brittle” theme hacks. Do not try to use JavaScript in the storefront to “trick” the cart into showing a discount. This will not reflect in your backend reports. The only durable way to change reporting is through the Checkout API and Functions.

Step 4: Implement Safely

Never deploy a new Cart Transform or Discount Function directly to your live store.

  • Use a development store or a Shopify Plus sandbox.
  • Test with different customer tags, shipping zones, and currencies.
  • Verify the data in the “Draft” sales reports before pushing to production.

Step 5: Measure and Iterate

After deployment, compare a day’s worth of data between your new system and your old manual calculations. Use Hook2Flow to send checkout data to Shopify Flow for custom monitoring if you notice any discrepancies in how discounts are being recorded.

Understanding the “Sales by Discount Code” Report

If you follow the “Better Compare At” strategy, your Compare-at prices will now show up in the Sales by Discount Code report. This report is the gold standard for campaign analysis.

Report Dimensions

The “Sales by Discount Code” report includes:

  • Discount Name: The internal name you give the discount.
  • Discount Type: Whether it’s a percentage, fixed amount, or “Buy X Get Y.”
  • Discount Method: Automatic vs. Code-based.
  • Total Sales: The final revenue generated by that specific campaign.

One common “gotcha” in this report is the overlap of combinable discounts. If an order uses both an “Automatic Free Shipping” discount and a “10% Off” code, the order may appear twice in the report—once for each discount. This is why it is critical to look at the Discounts by Order report (found in Finance reports) for a transaction-level view of how these costs interact.

Advanced Considerations for Developers

For developers building these solutions, there are several technical nuances to keep in mind, especially regarding currency and state.

Handling Shopify Markets

When you use UpdateOperationFixedPricePerUnitAdjustment in a Cart Transform, the value you provide is usually relative to the store’s base currency. If a buyer is in the UK and your store is in the US, Shopify handles the conversion, but mismatches can occur if your Function logic doesn’t account for the presentmentCurrencyRate.

A safe strategy is to verify the currency at the start of the Function. If there is a currency mismatch and your logic isn’t “currency-aware,” it may be safer to return an early exit to prevent incorrect pricing.

Using Signed Line Item Attributes

For highly custom storefronts, you can pass the “intended” compare-at price as a signed line item attribute. This involves using a liquid hash (hmac_sha256) on the storefront and then verifying that hash within a Rust-based Shopify Function. This prevents savvy customers from “injecting” their own prices into the cart via browser console manipulation.

Conclusion and Action Plan

Accurate reporting is the foundation of a scalable e-commerce business. While Shopify’s native handling of compare-at prices can be frustrating for financial analysts, the move toward Shopify Functions and Checkout Extensibility has given Plus merchants the tools to fix it.

By following the Nextools Playbook, you can transform your “Compare at Price” visibility and ensure your sales reports provide a true reflection of your promotional impact.

Actionable Checklist:

  • Audit current reports: Determine if your marketing team is manually calculating “savings” from compare-at prices.
  • Evaluate your tech stack: Are you still using legacy Shopify Scripts? If so, plan your migration to Functions to ensure long-term reporting stability.
  • Test the “Functions-First” approach: Explore how SupaEasy can help you implement Cart Transforms that align storefront savings with backend discount reporting.
  • Verify data flow: Use a staging environment to confirm that price changes are hitting the “Discounts” column in your sales reports as intended.

To explore how our full suite of tools can optimize your checkout and reporting logic, visit the Nextools Shopify App Suite hub. Our tools are built for performance, clarity, and reliability, ensuring you spend less time fixing data and more time growing your brand.

Nextools Shopify App Suite (Quick Links)

FAQ

Does Shopify Plus include custom sales reports for discounts?

Shopify Plus merchants have access to advanced filtering and the ability to create custom reports based on more granular dimensions. However, the fundamental way Shopify treats “Compare at Price” as a reduction in Gross Sales (rather than an applied Discount) remains the same across all plans unless you implement a custom Shopify Function or use an app like SupaEasy to transform the cart logic.

How do I test Script-to-Functions migration for my reporting?

The safest way is to use a Shopify Plus Sandbox store. You can use SupaEasy to replicate your legacy Script logic using the new Functions architecture. Once implemented, run several test transactions and wait approximately one minute for the Shopify Analytics reports to update. Compare the “Discounts” and “Gross Sales” columns against your legacy data to ensure parity.

Can I show “Compare at Price” savings as a discount without an app?

Technically, you can build a custom Shopify app that utilizes the Cart Transform and Discount Function APIs. However, this requires significant development resources, hosting, and maintenance. For most merchants and agencies, using a tool like SupaEasy is the most efficient and durable “Functions-first” approach to solving this reporting gap.

Will changing my compare-at price logic cause discount conflicts?

It can. Shopify has specific rules about how many discounts can be applied to a single line item. When you use a Function to transform a “Compare at Price” into a “Discount,” it counts against the discount limit. Before a full rollout, you should clarify your existing discount stack and use Cart Block to validate that customers aren’t inadvertently stacking multiple high-value offers.

SupaEasy is a product built & designed by Nextools

Company

© [2024] website by Nextools. All Rights Reserved. PIVA: 16711981007