Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Discount link (?discount=) not applying: how to find and fix it

CNV-169Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

An auto-applied discount link is a URL that carries a code, so the visitor does not have to type it. On Shopify the format is https://yourstore.com/discount/CODE. Other platforms use a query parameter such as ?discount=CODE or ?coupon=CODE, often handled by a plugin or custom script.

Why it costs you leads or sales

Your ad, email or influencer post promised a price. When the cart shows something different, trust drops fast. Many visitors will not go hunting for a code field, and some will not find the code again. You still pay for the click, but the sale is lost or the margin is not what the buyer expected.

Checkout starts from a discount link campaignExample numbers
Checkout starts from a discount link campaign (example)Link works: 8 %; Link drops the code: 3 %03683Link worksLink drops the code%

Example: share of clicks that reach checkout with the discount applied vs. without. Numbers are illustrative.

Where a discount link breaks
  1. Click linkEmail or ad with the code in the URL
  2. RedirectParameter or cookie is dropped
  3. CartFull price shown
  4. CheckoutNo discount line

The code is lost between the click and the cart, so every later step shows full price.

How to check if your site has it

Test the exact link a customer would click
  1. Copy the live link

    Take it from the email, ad or social post itself, not from your notes. Typos and missing characters are common.

  2. Open it in a private window

    Use a fresh incognito or private window with no previous cart or logged-in account.

  3. Watch the address bar

    Note whether the final URL still contains the code or parameter after any redirect. On Shopify, the visit should set a discount for the session even if the URL changes.

  4. Add an eligible product and open the cart

    Check that the discount line and reduced total appear in the cart or at checkout. Use a product that meets the code's rules.

  5. Repeat on mobile and from the real source

    Click from the actual email or in-app browser (Instagram, Facebook), since these can behave differently from a desktop browser.

How to fix it

Common causes are a redirect that removes the query string, a code that is expired or limited to certain products or customers, a cache that serves a page without the session, an in-app browser that blocks cookies, and a plugin conflict. Work through the steps below.

Fix a discount link that does not apply
  1. Confirm the code is valid

    Check start and end dates, usage limits, minimum purchase, eligible products or collections, and customer eligibility. Type the code manually to prove it works.

  2. Remove redirects that drop parameters

    Look at URL redirects, language or country redirects, and www/non-www or http/https rules. Make sure each one keeps the query string.

  3. Link to the right place

    Use the platform's official link format, and optionally add a redirect target so visitors land on the product or collection.

  4. Check caching and apps

    Exclude the discount URL or parameter from page caching. Disable popup, geo-redirect or cart apps one by one to find conflicts.

  5. Show the discount to the visitor

    Add a short banner such as 'Code SPRING10 will be applied at checkout' so a failure is obvious and the visitor can type it in.

Platform specifics
  1. Use the /discount/ format

    Use https://yourstore.com/discount/CODE. Add ?redirect=/products/your-product to send the visitor to a page after the code is stored.

  2. Check the discount settings

    In Admin > Discounts, check the dates, eligibility, and combinations. You can also copy a shareable link from the discount's page.

  3. Check Markets and redirects

    In Online Store > Navigation > URL redirects and any geolocation app, make sure /discount/ URLs are not redirected without the code.

Example: keep a ?discount= code for the sessionjavascript
const params = new URLSearchParams(window.location.search);
const code = params.get('discount');
if (code) {
  document.cookie = 'discount_code=' + encodeURIComponent(code) + '; path=/; max-age=86400; SameSite=Lax';
}

The cookie only stores the code. Your cart or checkout must read it and apply the discount on the server, using your platform's coupon logic.

Discount link behaviour

Before

  • Link redirects and the code is dropped
  • Cart shows full price
  • Visitor sees no message

After

  • Redirects keep the code or session
  • Cart shows the discount line
  • Banner confirms the code

How to confirm it's fixed

Confirmation checklist
  • The link works in a fresh private window
  • The discount line and reduced total show in the cart
  • It still shows at checkout, including after changing shipping
  • It works on mobile and in the in-app browser of your email or social app
  • The link works after a redirect to the target page
  • The code is valid for the intended products and dates

How to prevent it happening again

Before every campaign
  • Click the final link from the real email or ad preview before sending
  • Check the discount's end date against the campaign length
  • Retest after theme, app, redirect or caching changes
  • Keep a short visible fallback message with the code
  • Use one documented link format for the whole team
  • Test a live link on a schedule during long promotions
How a broken link unfolds (example)
  1. Day 1

    Campaign goes out with the discount link

  2. Day 1

    A new redirect rule strips the parameter

  3. Day 2

    Conversion rate dips, but no error appears

  4. Day 3

    Link is tested, redirect fixed

How FunnelGuard handles this

FunnelGuard detects this issue only partly. The check goes to your discount link and asserts the total, meaning it opens the URL like a visitor and verifies that the expected cart or checkout total reflects the discount.

What it does not cover: it does not judge whether the discount rules are right for every product, customer type or country, it does not test each in-app browser, and it does not read the discount's dates and eligibility inside your store admin. It also stops before payment unless your store's test mode is set up.

Cover the rest by hand: test each live campaign link from the real email or ad on a phone, check the discount's dates and eligibility in your admin, and recheck after changes to redirects, apps or caching. When a scheduled check fails, it is re-checked from a second region, then you get one alert with a screenshot and a likely cause. The Free plan includes 1 site and 2 journeys with daily checks and no card, and paid plans have a 3-day free trial.

Does the code survive the redirect?Interactive
Redirect strips the discount parameter

Ad click → yoursite.com/offer?gclid=Cj0KCQ…&utm_source=google&utm_campaign=spring

301 redirect

Lands on → yoursite.com/offer/

  • gclid
  • utm_source
  • utm_campaign

The visitor lands without the code and sees full price in the cart.

Toggle the redirect behaviour to see its effect on the cart.

Questions people ask

Why is my discount link not applying at checkout?

Usually a redirect removes the code, the code is expired or limited to other products or customers, or caching and cookies drop it. Test the exact link in a private window and type the code manually to see which one it is.

How do I create an auto-apply discount link in Shopify?

Use https://yourstore.com/discount/CODE. Add ?redirect=/products/product-handle to send the visitor to a specific page. You can also copy a shareable link from the discount's page in Shopify admin.

Why does the discount link work on desktop but not in my email app or Instagram?

In-app browsers handle cookies and redirects differently from normal browsers. Click the link from the real email or app on a phone. If it fails there, add a visible message with the code so the visitor can type it in.

Can WooCommerce apply a coupon from a URL?

Not by default. You need a coupon-URL plugin or custom code that reads the parameter, stores it and applies the coupon to the cart. Exclude that URL from page caching.

Does a redirect remove my ?discount= parameter?

It can. Redirect rules, language or country redirects, and http to https or www rules may drop the query string unless they are set to keep it. Compare the final URL with the original.

How can I test a discount link before sending a campaign?

Open it in a private window, add an eligible product, and check that the cart shows the discount and reduced total. Repeat on a phone from the real email or ad.

Can FunnelGuard monitor my discount link?

Partly. It opens the link and asserts the total to check that the discount is reflected. It does not verify every eligibility rule or in-app browser, so test those by hand.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: goto + assert total.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.