Promo Code Attribution: Who Really Gets Credit for the Coupon Sale
By Samarth Analytics · Published · Updated · E-commerce Analytics · 7 min read
Summary: Every promo code is a second attribution system. Click-based tracking credits the last campaign a shopper came through; the code credits whoever it was issued to. The two often disagree, and coupon sites, leaked influencer codes and discounts given to customers who would have bought anyway make the disagreement expensive. This guide covers how to track codes properly, build a code registry, reconcile code-based and click-based credit, and judge whether a code drove the sale at all.

The coupon box problem
A shopper sees an influencer's video, searches for the brand two days later, browses, adds to cart, then opens a new tab to look for a discount code. They find one on a coupon site, come back, apply it, and buy. Click-based attribution credits the coupon site, which happens to be an affiliate. The influencer's code was never used. The influencer gets no credit, the affiliate earns commission, and the brand pays a discount to a customer who had already decided to buy.
This is not an edge case. In many of the stores we audit, coupon codes create a second, parallel attribution system that conflicts with the one in GA4 and the ad platforms, and nobody has reconciled the two. Settling who gets credit for coupon sales is a common and valuable piece of e-commerce analytics work.
Tracking codes properly
Start with clean data. GA4's e-commerce events support a coupon parameter at order level on the purchase event, and at item level for item-specific discounts, with a discount parameter on items for the discount amount. Most setups we review either do not send the coupon at all or send it inconsistently. Get it right:
- Send the order-level coupon on
purchase, and onbegin_checkoutandadd_payment_infoif codes can be applied earlier. - Normalise codes before sending, usually to uppercase with whitespace removed, so "SUMMER20" and "summer20 " do not appear as two codes.
- Send item-level coupons and discount amounts where your platform applies discounts per item.
- Record codes that were attempted but rejected, as a separate event, if you want to see coupon hunting behaviour.
The rest of the e-commerce event setup should be solid first; enhanced e-commerce in GA4 without data chaos covers it.
Build a code registry
A code in a report means nothing until you know who it belongs to. Create a registry - a sheet or a table - with one row per code or code pattern:
- The code or pattern, such as a prefix used for all codes issued to one partner.
- The owner: the channel, partner, influencer, campaign or team that issued it.
- The type: public promotion, unique single-use, influencer, CRM or retention, customer service.
- Start and end dates.
- The discount and any conditions.
Import the registry into your reporting, through GA4 data import keyed on a custom dimension or in the warehouse, so every coupon order can be attributed to its code owner alongside its click-based channel.
Two attribution systems, four outcomes
With both systems in place, every coupon order falls into one of four groups:
- Agreement. The code owner and the click-based channel match - an email code used by a shopper who arrived from that email. Credit is clear.
- Code without a matching click. An influencer code used by a shopper who arrived through direct or organic search. This is common for influencer and podcast codes, where the code is the only trace of the channel. Code-based credit is usually more accurate here.
- Conflict. The code belongs to one partner, but the last click came from another - often a coupon or deal site. This is where leakage and commission disputes live.
- Click without a code. Most orders, and the normal territory of click-based attribution.
Report revenue by code owner alongside revenue by channel, with the conflict group shown separately. The conflicts are where money is being misallocated.
Tip: Agree a written rule for conflicts with your affiliate and influencer partners before a dispute, not during one. Many brands give code owners precedence over coupon sites that merely surfaced a code they did not issue.
Coupon sites and leakage
Codes leak. An influencer code shared with an audience appears on coupon aggregators within days, and from then on it is used by shoppers who never saw the influencer. Signs of leakage include a code's usage rising sharply after launch, orders using the code arriving from coupon site referrals, and usage far exceeding what the issuing channel's reach could explain.
The responses are both technical and commercial: issue unique single-use codes for high-value partners, expire codes promptly, monitor codes appearing on known coupon sites, and set affiliate programme rules that exclude commission on codes the affiliate did not issue. Leakage is one of several cross-channel credit problems described in attribution leaks across channels.
Setting up creator codes so credit stays clean
Influencer and creator programmes generate the most code-based credit and the most disputes. A few setup choices make them far easier to measure:
- Give every creator a unique code and a unique tagged link, so both systems can identify them. The link captures shoppers who click; the code captures those who remember.
- Use a consistent code pattern, such as a fixed prefix for the programme plus the creator's handle, so the registry can match codes by pattern rather than one by one.
- Set an end date for each code tied to the campaign, and a lower discount for evergreen codes than for launch codes, so leaked codes cost less.
- Track the creator's content dates in the annotations log, because code usage typically spikes in the days after a post and then decays.
- Report each creator on new customer share and net revenue, not just orders, so a creator whose audience is mostly existing customers is not mistaken for a growth channel.
With this structure, a creator's contribution can be measured from both the link and the code, and the gap between them shows how much of their influence click-based attribution would otherwise miss.
Did the code cause the sale?
Attribution answers who gets credit. It does not answer whether the discount was needed. A shopper who searches for a code after adding to cart had already decided to buy; the discount reduced margin without creating a sale. Public codes, sitewide promotions and codes found on coupon sites are the most likely to subsidise purchases that would have happened anyway.
Measure that effect where you can: holdout tests that withhold a promotion from a random share of eligible customers, comparisons of conversion rates for similar audiences with and without codes, and repeat purchase rates for customers acquired with discounts. Discount cannibalisation in paid media and incrementality versus attribution go further into the methods.
Reporting that changes decisions
The coupon report worth building shows, for each code owner and code type: orders, revenue, discount cost, net revenue after discount, the share of orders from new customers, and the share in the conflict group. For stores with cash on delivery or high returns, use delivered or net revenue, as in cash-on-delivery analytics. Codes that bring new customers at an acceptable discount cost are worth scaling; codes that mostly discount existing customers' orders are worth retiring.
Implementation checklist
- Coupon and discount parameters sent consistently, normalised, on purchase and checkout events.
- A code registry with owner, type and dates, imported into reporting.
- Revenue reported by code owner and by click-based channel, with conflicts shown separately.
- A written conflict rule agreed with partners.
- Leakage monitoring for high-value codes.
- At least one incrementality test per quarter for a major promotion.
Final thoughts
Coupon codes are an attribution system in their own right, and ignoring them means paying partners who did not drive sales and overlooking those who did. Track codes cleanly, map every code to an owner, reconcile code-based and click-based credit, and test whether discounts create sales or merely subsidise them. The result is fairer partner payments and a discount budget that earns its keep.
If your coupon codes and your attribution tell different stories, a free audit will show where the credit is going.
Topics: e-commerce growth, attribution leaks, marketing attribution, eCommerce analytics
More articles on the Samarth Analytics blog · Markdown version of this article