TrackRev
Blog
9 min read
coupon code affiliate tracking

Coupon Code Tracking for Affiliate Programs

34% of affiliate conversions come through coupon codes, not tracked links, hiding which channel pays your MRR. How to attribute code revenue in Stripe.

Muzahid Maruf — Founder of TrackRev.io

Muzahid Maruf, Founder

LinkedIn

On this page
  1. 01Why This Matters for Your Revenue
  2. 02How coupon code tracking works technically
  3. 03Conversion rates by channel type — code vs link
  4. 04Three approaches to coupon code attribution
  5. 05Stripe promotion-code integration
  6. 06Attribution accuracy by method
  7. 07Where code tracking breaks and how to prevent it
  8. 08Track affiliate codes and links together with TrackRev
  9. 09When NOT to use TrackRev for coupon code tracking

Explore with AI

Opens this article inside the chosen assistant with a ready-made prompt.

Knowing which channel actually pays your MRR means accounting for the 34% of affiliate conversions that never touch a tracked link.

According to Impact.com's partner benchmark research, that fraction of buyers reaches the checkout page through a route that bypasses every click-tracking mechanism you have — they saw a coupon code in a YouTube description, a newsletter footer, or a podcast read, typed it at checkout, and converted without a single tracked click.

Coupon code tracking is the practice of mapping a discount or promotion code back to the affiliate, campaign, or channel that distributed it, so that Stripe charges carrying that code can be attributed to revenue even when no tracked link preceded them. Without it, you are paying commissions blind and measuring affiliate revenue with a 34% gap.

Key Takeaways

  • 34% of affiliate conversions arrive via coupon code rather than a tracked link — a structural blind spot that hides which channel actually pays your MRR when you rely on click-only attribution.
  • Podcast and community affiliates convert via code at rates of 68–71%, while blog and SEO affiliates are mostly link-driven — the right tracking method depends on the distribution channel, not one-size-fits-all setup.
  • Unique 1:1 codes per affiliate achieve 96% attribution accuracy and under 2% dispute rates; shared or generic codes drop accuracy to 22% and are not recommended for commission accounting.
  • Code attribution is naturally cross-device: a buyer who hears a code on mobile and redeems it on desktop is attributed correctly, solving a problem that plagues link-based tracking without any extra infrastructure.
  • When a buyer uses both a tracked link and a different affiliate's coupon code, a pre-defined priority rule (usually code-wins) must be applied consistently before launch to prevent commission disputes.
  • At $50,000 MRR with a 20% affiliate share, a 34% code blind spot misclassifies roughly $3,500 per month of revenue — enough to flip channel budget decisions in the wrong direction.

Why This Matters for Your Revenue

The financial damage from code-blind attribution runs in two directions at once. First, affiliates who drive conversions primarily through codes — podcasters, newsletter authors, YouTubers — show zero or near-zero conversion in your click-based dashboard even when they are driving real revenue.

The rational response is to reduce or cancel their commission; the actual effect is to defund your best top-of-funnel partners.

Second, because those conversions still appear somewhere, they fall into "Direct" or "Organic Search" — channels that then look disproportionately strong and attract more budget for no good reason.

The dollar cost of a 34% blind spot

The economic stakes are not trivial. If 34% of affiliate revenue is unattributed, and affiliate drives even 20% of your total MRR, you are misclassifying roughly 7% of all company revenue every month.

At $50,000 MRR that is $3,500 per month sitting in the wrong bucket — enough to make or break a channel budget decision.

Closing this gap with code-level attribution is one of the fastest ways to get an honest read on partner ROI without changing a single creative or commission structure.

How coupon code tracking works technically

When a buyer enters a promotion code at checkout, your payment processor records it against the transaction. In Stripe, a successful charge using a promotion code includes the promotion_code field on the PaymentIntent or Subscription object.

Your job is to read that field from the Stripe event and look it up in a table that maps promotion codes to affiliates, campaigns, or channels.

Reading the promotion code from Stripe

The mapping itself is simple: each affiliate gets one or more unique promotion codes. When a Stripe charge arrives, you retrieve the promotion_code ID, resolve it to the human-readable code string, and match it against your mapping table.

The resulting attribution record ties the charge to the partner, the discount amount, the gross and net revenue, and the date — everything you need to calculate commission and measure channel performance.

The complication arises when a buyer uses both a tracked link and a code from a different affiliate. In that case you have two attribution signals competing for the same conversion.

You need a clear rule before you start: does the code override the click (last-touch by code), does the click win (last-touch by click), or do you split?

Most SaaS programmes use code-wins because the code was explicitly typed — it is a deliberate act of redemption, not a passive cookie.

Coupon codes perform differently from tracked links depending on the distribution channel. Channels with high-intent, loyal audiences tend to drive higher code-redemption rates; channels where audiences browse passively tend to favour the click path.

If you are deciding which signal to trust when both are available, see the head-to-head breakdown of coupon code vs affiliate link tracking and which attributes revenue more accurately.

Channel typePrimary attribution methodClick-to-paid rateCode-to-paid rateCode share of total conversions
Podcast sponsorshipCode0.4%3.1%71%
Newsletter sponsorshipBoth2.8%2.2%44%
YouTube review / tutorialBoth1.6%2.7%56%
Blog / SEO review postLink2.1%0.7%24%
Social media (paid partner post)Link1.3%0.5%27%
Community / Discord mentionCode0.9%3.4%68%
Short-form video (TikTok / Reels)Code0.6%2.4%63%

Based on TrackRev platform data, 2026. Click-to-paid and code-to-paid rates are medians across SaaS workspaces; figures vary by price point and offer depth.

Three approaches to coupon code attribution

There is no single architecture that fits every affiliate programme. The right approach depends on your commission structure, the number of affiliates, and how much overlap you expect between link clicks and code redemptions.

Unique code per affiliate — 1:1 mapping

The cleanest model: every affiliate receives exactly one promotion code that no one else uses.

When that code appears on a Stripe charge, the affiliate is credited automatically — no ambiguity, no overlap, no lookup table more complex than a flat key-value map.

This works perfectly for programmes with up to a few hundred affiliates where code management is not burdensome.

The trade-off is operational: you must generate a new code for every new affiliate, disable it promptly when a partnership ends, and decide what to do if an affiliate promotes someone else's code by mistake (rare but real).

For programmes at scale, code proliferation can become a Stripe admin problem — Stripe's Promotion Codes API makes bulk creation scriptable, which removes most of the friction.

Tapfiliate ($89/mo Essential) and FirstPromoter ($49/mo Starter) both support unique-code-per-affiliate models, though commission accounting still has to be reconciled against Stripe in a second step.

Because the mapping is 1:1, this approach also gives you clean commission accounting: gross revenue from codes with affiliate ID X equals affiliate X's commission base. No weighting, no attribution split, no disputed conversions.

For most SaaS affiliate programmes under 200 partners, this is the correct starting point. See also how this integrates with the broader affiliate program link tracking setup.

For affiliates who post both a tracked link and a code — common in blog reviews — you can capture both signals and apply a priority rule.

The tracked link fires a first-party click event with the affiliate's ID; the code arrives later at checkout. If both point to the same affiliate, you have a confirmation signal. If they differ, your priority rule resolves the conflict.

The main advantage of this approach is redundancy: if the tracked link click is lost (cookie blocked, cross-device, long attribution window), the code still closes the loop.

The disadvantage is that you need your affiliate platform and your Stripe attribution layer to share a common affiliate ID namespace — otherwise reconciling the two signals becomes a join across two unrelated identifier schemes.

TrackRev's affiliate tracking uses the same affiliate ID for both links and codes, making the join trivial.

Post-purchase survey for high-ticket or code-heavy funnels

When your product is priced above $200/month, many buyers will complete their own research journey across multiple channels before committing.

In that scenario, no single link or code tells the whole attribution story — the podcast code got them aware, the blog post convinced them, the trial email closed them.

A one-question post-purchase survey ("Where did you hear about us?") adds the human layer that code and click tracking cannot recover.

This is not a replacement for technical attribution — it is a supplement for the portion of high-ticket conversions where self-reported attribution is more accurate than any inferred signal.

Aggregate the survey responses quarterly and use them to adjust channel weightings in your attribution model. Pair the survey data with the code and link data for the closest thing to a ground-truth view of your affiliate funnel.

Stripe promotion-code integration

Reading the promotion code from a Stripe charge takes a single API call after the payment_intent.succeeded webhook fires.

Extracting the code from the webhook payload

The snippet below fetches the PaymentIntent with its invoice expanded, then pulls the promotion code string from the first discount.

Read promotion code from Stripe charge (Node.js)
// After receiving the payment_intent.succeeded webhook event:const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY); async function getPromoCode(paymentIntentId) {  const intent = await stripe.paymentIntents.retrieve(paymentIntentId, {    expand: ["invoice.discounts.promotion_code"],  });   const invoice = intent.invoice;  if (!invoice || !invoice.discounts || invoice.discounts.length === 0) {    return null; // No promotion code used  }   const discount = invoice.discounts[0];  const promoCode = discount.promotion_code; // Expanded object  return promoCode?.code ?? null; // e.g. "PARTNER_ALICE_20"} // Map the code string to your affiliate record:async function attributeCharge(paymentIntentId, affiliateMap) {  const code = await getPromoCode(paymentIntentId);  if (!code) return { attributed: false };   const affiliate = affiliateMap[code.toUpperCase()];  if (!affiliate) return { attributed: false, code };   return { attributed: true, code, affiliateId: affiliate.id };}

Attribution accuracy by method

Each approach has a different accuracy ceiling depending on how cleanly it can be implemented. "Accuracy" here means the proportion of real affiliate-driven conversions that are correctly attributed to the right partner.

MethodAttribution accuracyCommission dispute rateImplementation complexityBest suited for
Unique code per affiliate (1:1)96%Under 2%LowProgrammes ≤200 affiliates
Code + tracked link (combined)98%Under 1%MediumMixed link/code affiliates
Link only (no code fallback)66%11%LowBlog/SEO-only programmes
Post-purchase survey (supplement)N/A — qualitativeN/ALowHigh-ticket, multi-touch
Shared promo code (no 1:1 mapping)22%HighNoneNot recommended

Accuracy estimates based on PartnerStack affiliate programme benchmarks and internal implementation patterns; dispute rates are approximate.

Where code tracking breaks and how to prevent it

Coupon code attribution has failure modes that link tracking does not. Understanding them before you build prevents the most expensive mistakes.

Code leakage and sharing

The most damaging failure mode is when an affiliate's code escapes its intended audience and becomes a public discount.

  • Code sharing across buyers — a buyer posts the affiliate's code publicly on Reddit, Honey, RetailMeNot, or Slickdeals, and it is redeemed by people the affiliate never reached. Add a per-customer redemption limit in Stripe (max 1 per customer) and a total redemption cap (e.g., 200 uses) so the code retains its affiliate-specific signal rather than becoming a generic public discount.
  • Affiliate switches to a competitor's code — if you share a generic brand code (e.g., SAVE20) with multiple affiliates instead of unique codes, you cannot tell who drove the conversion. Never use shared codes for commission attribution.

Operational failures — expiry and typos

These failures lose conversions outright rather than mis-attributing them.

  • Code expiry mismatches — an affiliate promotes a code that has already expired, the buyer fails at checkout, and you lose the conversion and the affiliate's goodwill. Set expiry dates in Stripe and notify affiliates automatically at least 14 days before a code expires.
  • Typos at checkout — a buyer hears a code on a podcast and misspells it. Stripe returns an error, the sale is lost, and you never see the conversion. Consider offering a small set of phonetically distinct codes that are hard to mishear (avoid similar characters like O/0, I/l/1).

Cross-device code redemption — a hidden advantage

Not all code-tracking edge cases are problems. Cross-device code redemption — a buyer sees the code on mobile and redeems it on desktop — is actually an advantage.

Unlike link tracking, code attribution is device-agnostic — the code travels in the buyer's memory, not in a cookie. Code attribution naturally solves the problem that plagues link-based cross-device attribution.

Code-attribution gap by programme size

Programmes using shared or generic codes (e.g. a single PARTNER20 for all affiliates) attribute only 22% of code-driven conversions correctly, versus 96% for programmes with unique 1:1 codes. The upgrade from shared to unique codes is a one-time migration that pays back in accurate commission accounting within the first payment cycle.

TrackRev reads Stripe promotion codes from every incoming charge and matches them against your affiliate mapping in real time. Each affiliate's dashboard shows click revenue, code revenue, and combined revenue in a single view — no manual reconciliation, no spreadsheet joins.

You can create tracked links and map promotion codes under the same affiliate ID, so the belt-and-braces approach requires no extra plumbing.

Commission calculations run automatically: net revenue per affiliate, per code, per campaign, with the analytics drill-down going all the way to individual charges.

Read more about the broader setup in affiliate program link tracking and compare approaches in affiliate attribution vs channel attribution.

Coupon codes and tracking links only resolve to the same Stripe record when one tool owns both attribution channels.

The standard SaaS stack puts them in different tools: Bitly Growth at $35/month tracks the click side, Rewardful Starter at $49/month handles the affiliate codes, and the two systems disagree on which conversion to credit when a buyer clicks a link and types a code from a different partner.

$84/month combined, plus a monthly spreadsheet to merge the two halves.

TrackRev maps every promotion code and every tracked link to the same Stripe charge for $39/month — 54% cheaper than the two-tool stack — so the code-wins rule (or whichever priority you set) runs against a single attribution record, not two.

That is the only architecture that makes commission accounting from codes provably correct.

Coupon codes and tracked links only resolve to the same Stripe charge when one tool owns both attribution mechanisms — otherwise the code-wins (or link-wins) priority rule runs against two separate records and produces two separate commission outcomes.

Most SaaS teams run Bitly Growth ($35/mo) for link tracking and Rewardful Starter ($49/mo) for affiliates — $84/mo for two tools with two different definitions of a conversion.

TrackRev is $39/mo for both, on the same Stripe data, with no monthly reconciliation between systems.

If your podcast affiliates rely on codes and your bloggers rely on links, both halves of attribution have to live in one record before commission accounting is honest.

For deeper benchmarks, see Impact.com's partner data, Stripe's coupon and promotion code documentation, and category reviews on G2's affiliate marketing software grid.

When NOT to use TrackRev for coupon code tracking

If your affiliate programme is purely click-based — blog reviewers and comparison-site listings who always use a tracked link and never promote a code — the Stripe promotion-code layer adds complexity without adding value.

Likewise, if you are running a broadly advertised public launch promo — a single code blasted across your homepage, pricing page, and social channels rather than issued per partner — TrackRev's 1:1 mapping model is not the right fit.

TrackRev is designed for SaaS affiliate programmes where each partner has a distinct audience and a distinct code; it is not a general-purpose coupon-management system.

Found this useful? Share it.

PostLinkedIn

Frequently asked questions

Muzahid Maruf — Founder of TrackRev.io

Written by

Muzahid Maruf, Founder, TrackRev.io & Contant.io

Muzahid Maruf is the founder of TrackRev.io and Contant.io. He writes about marketing attribution, link tracking, and revenue analytics for SaaS teams.

Writes about Marketing attribution · Link tracking · Revenue analytics · SaaS growth

Keep reading

Related articles from the TrackRev blog.

Stop guessing where your revenue comes from.

Set up TrackRev in 5 minutes. Free tier covers 1,000 events / month — no card needed.

Coupon Code Tracking for Affiliate Programs · TrackRev