On this page
What this issue is
Affiliate programmes credit a sale in two common ways. A cookie is a small file saved in the browser when someone clicks a partner's link. A coupon code is a discount code tied to a partner, such as an influencer's own code. Both can be present on the same order.
A conflict appears when the cookie names Partner A and the coupon names Partner B. Depending on how your affiliate platform is set up, A, B, both or neither may be paid. The result is often inconsistent, because the rule is rarely written down.
- Click partner A linkAffiliate cookie saved for A
- Find partner B couponBuyer searches for a discount code
- Apply code at checkoutOrder now carries cookie A and code B
- Commission decidedA, B, both or neither paid
The cookie and the coupon point to different partners, and the platform has no clear rule.
Why it costs you leads or sales
The direct cost is usually modest: wrong or doubled commissions, and disputes with partners. The wider cost is trust. If partners see sales they referred credited to someone else, good ones leave, and your reporting on which channels bring orders becomes unreliable.
It also skews decisions. If coupon-site partners win credit for buyers who were already on their way to buy, you may overpay for sales you would have had anyway and underpay the content creators who started the journey.
Example: with no written rule, credit for the same 100 orders splits unpredictably between partners.
How to check if your site has it
You need to place test orders yourself, or review real ones, and compare what your affiliate platform records against what the buyer actually did.
Create two test partners
In your affiliate platform, make Partner A with a tracking link and Partner B with a coupon code. Use test or staff accounts.
Click Partner A's link in a clean browser
Use a private window so no old cookies interfere. Confirm the affiliate cookie is set in your browser's developer tools under Application, then Cookies.
Place an order with Partner B's code
Add a product, apply the coupon at checkout and finish the order using a test payment mode or a 100% discount, if your store allows it.
Check who got credit
Open the conversion in your affiliate dashboard. Note whether A, B, both or neither was credited, and whether the commission amount is right.
Repeat the other combinations
Try cookie only, coupon only, and coupon first then link click. Record each result in a table.
| Scenario | Cookie | Coupon | Expected credit | Actual credit |
|---|---|---|---|---|
| Link only | A | none | A | |
| Coupon only | none | B | B | |
| Link, then coupon | A | B | Your chosen rule | |
| Coupon, then link | A | B | Your chosen rule |
How to fix it
The fix is a decision first and a setting second. Pick the rule, write it into your partner terms, then configure your tools to match.
| Rule | Good for | Watch out for |
|---|---|---|
| Cookie wins | Rewarding the partner who sent the visit | Coupon-leak sites can drop a cookie late and still win |
| Coupon wins | Influencer codes shared in videos or podcasts | Public coupon sites can claim buyers who never saw them first |
| Last touch wins | Simple to explain | Favours whoever shows up at the end of the journey |
| Coupon wins only if code is unique to a partner | Balancing both methods | Needs unique codes per partner and clean code management |
Make partner codes unique
In Shopify admin, go to Discounts and create one code per partner. Avoid reusing a generic code across partners.
Set the rule in your affiliate app
Open your affiliate app's settings and look for options on coupon tracking and attribution priority. Names vary by app, so check its documentation.
Test with a real checkout
Run the test matrix above and confirm the order shows the right partner.
Create unique coupons
If you use WooCommerce, go to Marketing, then Coupons, and make one coupon per partner.
Configure your affiliate plugin
In the plugin's settings, look for coupon tracking and which method takes priority. Options differ by plugin.
Test the combinations
Place orders with link only, coupon only and both, then check the credited partner.
Store both signals on the order
Save the affiliate ID from the cookie and the coupon code as separate fields on the order record.
Apply your rule in one place
Decide the winner in a single function on the server, not in several scripts, so every report uses the same result.
Send one conversion to the platform
Pass the winning partner to your affiliate platform's API, and never send two conversions for one order.
function pickPartner(cookiePartner, couponPartner, rule) {
if (!cookiePartner && !couponPartner) return null;
if (!cookiePartner) return couponPartner;
if (!couponPartner) return cookiePartner;
// both present: apply your written rule
return rule === 'coupon' ? couponPartner : cookiePartner;
}How to confirm it's fixed
- Link only: the link partner is credited once
- Coupon only: the coupon partner is credited once
- Link plus coupon: the winner matches your written rule
- Only one conversion is recorded per order
- Commission amounts match the discounted order total
- Refunded test orders reverse the right commission
No clear rule
- Credit varies order to order
- Partners dispute commissions
- Some orders pay two partners
One written rule
- Same winner every time for the same inputs
- One conversion per order
- Partners know what to expect
How to prevent it happening again
- Issue one unique code per partner and retire leaked codes
- Document the priority rule in your partner agreement
- Re-run the test matrix after changing your affiliate app, checkout or discount setup
- Review a sample of conflicted orders each month
- Watch for coupon sites listing codes not meant for public use
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. It is a question of commission rules and attribution logic inside your affiliate platform, and it shows up only when real orders carry both a cookie and a coupon. The kind of tool that fits is an affiliate or partner-management platform with attribution reporting, or an order-level audit of your own data.
FunnelGuard does help with neighbouring problems. It runs your real customer journeys on a schedule and checks that tracking hits reach ad and analytics platforms, so it can show that a journey still works end to end. It does not judge which partner should get credit for an order.
Questions people ask
Why did the wrong affiliate get paid when a coupon code was used?
Your affiliate platform probably had two signals on the order, a cookie for one partner and a coupon for another, and applied its default priority. Check the platform's settings for coupon tracking and attribution order, then test each combination.
Does a coupon code override an affiliate cookie?
It depends on your affiliate platform and its settings. Some prefer the cookie, some prefer the coupon, and some use the most recent touch. Check your platform's documentation and test to see what yours does.
How do I stop coupon sites from stealing affiliate commissions?
Use unique codes per partner, set cookie-wins or a similar rule, and retire codes that leak onto public coupon sites. Also state in your terms that unauthorised code listings are not eligible for commission.
Can one order pay two affiliates?
Yes, if both the cookie and the coupon are tracked as separate conversions. Make sure only one conversion is sent per order, and decide the winner in a single place.
Should coupon codes or cookies get priority in affiliate tracking?
Neither is always right. Cookie priority rewards the partner who sent the visit, while coupon priority suits influencers whose audiences use their code directly. Pick one, write it down and apply it consistently.
How do I test coupon and affiliate cookie attribution?
Create two test partners, click one link in a private window, then buy using the other partner's code. Check which partner is credited and repeat with link only, coupon only and both orders reversed.
Can FunnelGuard detect coupon and affiliate cookie conflicts?
No. This needs an affiliate or attribution tool that sees real orders and commission rules. FunnelGuard monitors journeys, tracking hits and lead delivery instead.
Related issues
- TRK-259Affiliate tracking script missing (Impact, PartnerStack, Rewardful)Fix guide
- TRK-260Affiliate click ID (irclickid, ref) lost on redirectFix guide
- TRK-261Affiliate cookie not set or wrong domainFix guide
- TRK-262Affiliate conversion pixel missing on order confirmationFix guide
- TRK-263Affiliate conversion fires for every order including non-affiliateFix guide
- TRK-265Shopify/Stripe affiliate integration not passing order IDsFix guide