On this page
What this issue is
Your ad, email or landing page promises a discount such as SPRING20. The visitor reaches checkout, enters the code and sees an error like "Invalid code" or "Code not applicable", or the discount silently does nothing. The offer you paid to advertise does not work.
Why it costs you leads or sales
Example: illustrative numbers only. Share of ad visitors at checkout who finish an order, with a working code versus a rejected code.
- Ad clickAd promises code SPRING20
- Landing pageProduct page loads
- Checkout codeCode rejected or ignored
- PaymentVisitor leaves
- Purchase trackedNo conversion
The visitor does everything right until the code is rejected.
How to check if your site has it
- Click your live ad or the exact tracking URL, in a private window.
- Copy the code from the ad text itself and paste it, so typos in the ad show up.
- Try it on the advertised product, then on a different one.
- Try it with a basket below and above any minimum spend.
- Try it as a new customer and, if relevant, with a country or shipping method the ad targets.
- Check the order total actually drops, not just that no error shows.
- Repeat on mobile.
| Cause | What the shopper sees | Where to look |
|---|---|---|
| Typo or case mismatch | Invalid code | Ad copy versus code in your store |
| Expired or not yet active | Code expired or invalid | Start and end dates and time zone |
| Usage limit reached | Code invalid | Total or per-customer usage limit |
| Product or collection rules | Not applicable to items | Eligible products, collections, categories |
| Minimum spend or quantity | Requirements not met | Minimum purchase setting |
| Clashes with another discount or sale price | Code ignored | Combination and exclude-sale-items settings |
| Link or redirect drops the code | Field empty at checkout | Auto-apply URL, redirects, cached pages |
How to fix it
Match the ad to the code
Copy the code from your store into the ad, not the other way round. Avoid look-alike characters such as O and 0.
Check dates and limits
Confirm the start and end dates, the time zone, and that usage limits are not already used up.
Loosen the rules to match the offer
Make sure eligible products, minimum spend and customer eligibility match what the ad actually says.
Carry the code through the link
Use an auto-apply link where possible so shoppers need not type anything. Make sure redirects keep the query string.
Retest and keep a record
Run the manual test again and note the date, so you know when it last worked.
Review the discount
In Admin go to Discounts, open the code and check Active dates, Minimum purchase requirements, Customer eligibility, Usage limits and Combinations.
Use a discount link
Share https://yourstore.com/discount/SPRING20?redirect=/products/your-product so the code is applied to the cart automatically.
Review the WooCommerce coupon
Go to Marketing > Coupons and open the coupon. Check Expiry date, Usage restriction (minimum spend, exclude sale items, products, categories) and Usage limits.
Check caching
Exclude cart and checkout pages from page caching, as cached carts can hide a discount.
Do not rely on it to apply codes
GTM cannot fix a rejected code, but you can pass the code in a data layer event so you can see in analytics which codes fail.
Check the Ecommerce discount
In the Ecommerce panel open Discounts and check dates, usage limits, minimum order and eligible products. Test in the published site, not the Designer preview.
Review the coupon
In the dashboard go to Marketing > Coupons, then check the start and end dates, usage limit and the items or minimum order it applies to.
Review the discount
Go to Commerce > Discounts. Check Valid dates, Minimum requirements, Applies to and Usage limits. You can also share a discount link from the discount panel.
Normalise the code
Trim spaces and compare codes case-insensitively on the server.
Persist the code
Store the code from the URL in a cookie or session so it survives redirects and page changes.
const params = new URLSearchParams(window.location.search);
const promo = params.get('promo');
if (promo) {
sessionStorage.setItem('promo', promo.trim());
}
// At checkout, read sessionStorage.getItem('promo') and apply it server-side.How to confirm it's fixed
Before
- Code typed from ad is rejected
- Rules exclude the advertised product
- Link drops the code on redirect
After
- Code matches the ad and is active
- Rules match the offer
- Auto-apply link keeps the code to checkout
How to prevent it happening again
- Test each code from the live ad link before launch.
- Set the end date after the campaign end, in the right time zone.
- Set usage limits high enough for expected traffic.
- Re-test after theme, plugin or checkout changes.
- Tell the team when a code is changed or switched off.
- Pause the ad when a code is retired.
How FunnelGuard handles this
Questions people ask
Why is my promo code from an ad not working at checkout?
Usual causes are a typo or case mismatch, an expired or used-up code, rules that exclude the product or basket, or a link that did not carry the code. Test the exact code from the live ad in a private window and check the discount settings in your store.
Why does my discount code say invalid when it is active?
Check customer eligibility, minimum spend, eligible products, usage limits and the time zone of the start date. An active code can still be rejected if the basket does not meet its rules.
How do I make a discount apply automatically from an ad link?
Use your platform's discount link or auto-apply feature. On Shopify, a link in the form /discount/CODE?redirect=/products/name applies the code. Check that redirects and caching keep the query string.
Why does my coupon work for me but not for customers?
You are probably logged in, using an admin account or a basket that meets the rules. Test in a private window as a new customer, on mobile, with the same product and country the ad targets.
Can a redirect remove a promo code from the URL?
Yes. If a redirect does not keep the query string, a code in the link is lost before checkout. Make the redirect pass parameters through, or store the code in a cookie or session on arrival.
How often should I test promo codes from ads?
Test before launch, after any site or discount change, and regularly during the campaign. A scheduled automated journey can repeat the check for you, but still confirm each new code by hand.
Can FunnelGuard test my promo code?
Partly. If you configure a coupon journey, FunnelGuard runs it on a schedule and checks each step. It does not test every code, product or basket combination, so test new codes by hand too.
Related issues
- PRF-220No thank-you/confirmation after submitFix guide
- PRF-229Back button broken (history hijacked, redirect loop)Fix guide
- PRF-230Back button loses form/cart stateFix guide
- PRF-219Submit button disabled with no explanationFix guide
- PRF-214Error messages unclear or genericFix guide
- PRF-208Main CTA not visible without scrollingFix guide