How to Track Failed Discount Codes in Shopify (Native Reports Won’t Show You)
Open your Shopify admin and look at Analytics → Reports → Sales by discount. Every number in there describes a discount code that worked. Redemptions, discounted sales, average order value with the code applied — all success metrics.
Now try to answer a different question: how many customers typed a discount code yesterday and got rejected? Which codes? How much was in their carts?
You can’t. Shopify has no native report of failed discount attempts. The data exists for a moment — an error appears in the customer’s checkout — and then it’s gone. This guide covers what actually happens when a code fails, and the four realistic ways to capture it.
What a failed attempt looks like
When a customer submits a code at checkout, one of two rejections can happen:
- The code doesn’t exist — typo, expired-and-deleted, or from another store. Shopify shows the generic “Enter a valid discount code or gift card.” The customer gets no clue what was wrong.
- The code exists but doesn’t apply — minimums, eligibility, combination conflicts. Shopify usually shows a more specific message.
Two details matter for tracking:
- In the first case, the exact string the customer typed is right there in the field — the single most valuable piece of data, because it contains the typo.
- In both cases, the customer’s cart has a value at that moment. A failed code on an $84 cart and one on a $700 cart are very different problems.
For the full taxonomy of why codes fail, see the 9 causes of discount code failures.
Option 1: Support tickets (what most stores rely on)
Some customers do write in: “the code doesn’t work.” Each ticket is real signal, and it’s worth logging: date, code as the customer reports it, and resolution.
The problem is the denominator. Contacting support in the middle of a purchase is high-friction, so tickets are the visible tip of the failures — and they arrive without the typed string (“I entered the code from your email…”) or the cart value. Useful as a smoke alarm; useless as measurement.
Option 2: Session recording apps
Session replay tools capture checkout struggles, including discount errors, and give rich context around them.
The trade-offs are real, though: you’re recording entire sessions to catch a single event, someone has to watch or query the recordings, checkout coverage varies by tool, and you take on meaningful privacy weight (consent banners, data retention, GDPR reviews) for what is, here, a one-field question.
If you already run session recording for UX research, add “discount error” to what you look for. Installing it only for this is heavy.
Option 3: Build it yourself with a Web Pixel
If you have a developer, Shopify’s Web Pixels API can do this properly. Custom pixels run in Shopify’s sandbox and can subscribe to checkout UI events; when the checkout surfaces an alert about the discount field, your pixel can read the alert’s target and value and send it to an endpoint you own.
The honest version of this route:
- You’ll need an endpoint, storage, and some dashboard on top — the pixel is the easy 20%.
- Checkout events around alerts are a moving surface. Build defensively: capture what’s present rather than hard-coding event shapes, and expect to maintain it as Shopify evolves checkout.
- Done well, it’s invisible to customers and adds nothing to your theme.
This is a genuinely good option for stores with engineering time. It’s also, transparently, what we productized.
Option 4: Install an app that does exactly this
Recoupon is a Shopify app we built around that one job. It listens for discount errors inside Shopify’s checkout via a Web Pixel, and records each failed attempt: the code exactly as typed, whether it was invalid vs. not-applicable, the cart total at that moment, and when it happened.
On top of the raw feed it adds the two things that make the data actionable:
- Typo clustering —
SUMMER2O,SUMER20andSUMMER 20group under “probably meantSUMMER20,” with attempts and cart value summed. (Why typos deserve their own guide.) - Alerts on active codes — watch the code from your current campaign, and get an email if it starts failing repeatedly, in time to fix the campaign instead of the post-mortem.
It’s read-only by design — it never creates or edits discounts — and the free plan captures everything, so you can measure the leak before paying anyone anything.
What to do with the data once you have it
Tracking is only step one. The patterns you’ll act on:
- A typo cluster around an active code → create the typo as an alias code with matching limits, or fix the creative that’s spreading it.
- An expired code still being typed → residual demand. A “that promo ended, here’s this instead” email beats silence.
- A valid code failing on eligible-looking carts → misconfigured combinations or minimums; test the exact failing cart.
- High cart values behind failures → prioritize by money, not attempt count. Ten failures on $30 carts matter less than three on $600 carts.
The bottom line
Shopify’s discount reporting answers “how well did my codes perform?” It cannot answer “how often did my codes fail, for whom, and at what cost?” — the data simply isn’t retained. Whether you capture it with support-ticket discipline, a custom pixel, or an app built for it, the stores that measure this stop leaking quietly.