Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Coupon code vs affiliate cookie conflict: how to fix attribution

TRK-264Low impactOther toolBy FunnelGuardPublished Updated
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.

How two partners claim one order
  1. Click partner A linkAffiliate cookie saved for A
  2. Find partner B couponBuyer searches for a discount code
  3. Apply code at checkoutOrder now carries cookie A and code B
  4. 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.

Commission paid on 100 conflicted ordersExample numbers
Commission paid on 100 conflicted orders (example)Paid to cookie partner: 45 orders; Paid to coupon partner: 35 orders; Paid to both: 15 orders; Paid to neither: 5 orders017344535155Paid to cookie partnerPaid to coupon partnerPaid to bothPaid to neitherorders

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.

Test the conflict
  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. Repeat the other combinations

    Try cookie only, coupon only, and coupon first then link click. Record each result in a table.

Test matrix to fill in for your own platform
ScenarioCookieCouponExpected creditActual credit
Link onlyAnoneA
Coupon onlynoneBB
Link, then couponABYour chosen rule
Coupon, then linkABYour 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.

Common priority rules and their trade-offs
RuleGood forWatch out for
Cookie winsRewarding the partner who sent the visitCoupon-leak sites can drop a cookie late and still win
Coupon winsInfluencer codes shared in videos or podcastsPublic coupon sites can claim buyers who never saw them first
Last touch winsSimple to explainFavours whoever shows up at the end of the journey
Coupon wins only if code is unique to a partnerBalancing both methodsNeeds unique codes per partner and clean code management
Apply your rule
  1. Make partner codes unique

    In Shopify admin, go to Discounts and create one code per partner. Avoid reusing a generic code across partners.

  2. 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.

  3. Test with a real checkout

    Run the test matrix above and confirm the order shows the right partner.

Example: pick one partner per order (custom code)javascript
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

Confirmation checks
  • 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
Before and after

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

Prevention habits
  • 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.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

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.