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.
Example: share of clicks that reach checkout with the discount applied vs. without. Numbers are illustrative.
- Click linkEmail or ad with the code in the URL
- RedirectParameter or cookie is dropped
- CartFull price shown
- 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
Copy the live link
Take it from the email, ad or social post itself, not from your notes. Typos and missing characters are common.
Open it in a private window
Use a fresh incognito or private window with no previous cart or logged-in account.
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.
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.
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.
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.
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.
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.
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.
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.
Use the /discount/ format
Use
https://yourstore.com/discount/CODE. Add?redirect=/products/your-productto send the visitor to a page after the code is stored.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.
Check Markets and redirects
In Online Store > Navigation > URL redirects and any geolocation app, make sure
/discount/URLs are not redirected without the code.
Check how WooCommerce handles the link
WooCommerce has no built-in coupon URLs. Use a coupon-URL plugin or custom code, and confirm that it is active and set to the right coupon.
Exclude the URL from cache
In your caching plugin, exclude the query parameter or the cart and checkout pages, and clear the cache after the change.
Check the cart session
Some plugins only apply a coupon when the cart has items. Make sure the plugin stores the code and applies it on the first add to cart.
Check that tags do not alter the URL
Custom HTML tags that rewrite the URL with history.replaceState or redirect can remove the parameter before your cart script reads it.
Check Webflow Ecommerce
Webflow Ecommerce has no automatic discount-link feature, so a code from the URL needs custom script. Otherwise tell visitors to enter the code at checkout.
Check 301 redirects
In Site settings > Hosting > 301 redirects, make sure rules keep query strings where needed.
Store the code on arrival
Read the parameter on page load, save it in a cookie or session and apply it server-side at cart creation. See the snippet below.
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.
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
- 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
- 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
Day 1
Campaign goes out with the discount link
Day 1
A new redirect rule strips the parameter
Day 2
Conversion rate dips, but no error appears
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.
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.