How to Track Affiliate Sales with Coupon Codes

WooCommerce affiliate coupon tracking lets an affiliate be credited without a referral link: you assign one of your store’s coupons to them in Affiliate and Referral Program for WooCommerce, and every order that uses that code earns them commission — no click, no cookie required beforehand. This guide covers assigning a coupon, how the credit is decided when a code and a referral link disagree, and where the affiliate sees their code. Part of the plugin documentation.

What coupon tracking is for

↑ Back to top

Referral links work when someone clicks. A coupon code works everywhere a link cannot go: read aloud in a podcast, printed on a flyer, spoken on video, or typed by a customer who found your store on their own. The code carries the attribution, so the affiliate is credited at checkout even if the customer never touched their link.

It also gives the customer a reason to use the code, since a coupon is a discount in its own right. You keep full control: the coupon is an ordinary WooCommerce coupon, with your usual amount, restrictions and expiry.

Assign a coupon to an affiliate

↑ Back to top
  1. Go to: Marketing > Coupons and add a coupon, or open an existing one.
  2. Set the coupon up as you normally would — code, Discount type, amount, usage limits.
  3. In the Coupon data box, on the General tab, choose the affiliate in Select Affiliate.
  4. Publish (or Update) the coupon.
The WooCommerce coupon edit screen with the Coupon data General tab open and the Select Affiliate dropdown assigning the coupon to an affiliate.
Assigning a coupon to an affiliate

Only approved affiliates appear in the list, so approve an applicant before you try to hand them a code. There is no separate switch to turn coupon tracking on — assigning the coupon is what enables it.

How the credit is decided

↑ Back to top

When the code is applied to a cart, the store attaches that affiliate to the shopper’s session for the rest of your cookie duration, and the order that follows pays them commission under your normal commission rules. Two consequences are worth knowing:

  • The code wins over an earlier link. If a shopper arrived through one affiliate’s link and then applies a different affiliate’s code, the code takes the credit — the most recent action decides.
  • Removing the code undoes it. If the shopper removes the coupon from their cart again, the attribution it created is removed with it.

One rule sits above both: if Unlimited / Lifetime Commission: is on and the customer is already tied to an affiliate, that lifetime owner keeps the commission whatever code is used. See How to Set Up Lifetime Commissions for Affiliates.

Applying an affiliate coupon replaces the link attribution for that visit completely. If the shopper had arrived through a product-specific link, the setting Commission for only the URL opened? and any sharing bonus tied to that link no longer apply to the order — the coupon owner is credited under your ordinary rules instead.

When a code and a link belong to different affiliates

↑ Back to top

Codes are treated as personal to the affiliate they belong to. If a shopper arrives through affiliate A’s referral link and then tries affiliate B’s code, the store removes that coupon from the cart rather than let one affiliate’s discount be spent on another’s referral. A shopper with no affiliate attached to their session can use any assigned code normally.

This keeps codes from being harvested from coupon sites and applied to someone else’s traffic, and it means an affiliate’s discount is only ever spent on sales they can be paid for.

Where the affiliate sees their code

↑ Back to top

The affiliate finds the code on the Payout tab of their dashboard, on a card headed Coupon code. Until you assign one, that card reads Not Generated by the Admin. The code is shown as plain text for them to copy and share.

The affiliate dashboard Payout tab showing the Coupon code card with the code assigned by the store owner.
The affiliate’s assigned code

You can point several coupons at the same affiliate and every one of them credits correctly, but the dashboard card shows only the most recently assigned code — tell the affiliate directly if you give them more than one.

Checking that a coupon sale was credited

↑ Back to top

Go to: WooCommerce > Affiliate & Referral > Manage Referrals. A coupon-driven sale appears exactly like a link-driven one — same affiliate, order and amount, waiting for your approval — so nothing changes about how you review and approve it.

The Manage Referrals list including the commission generated for the affiliate whose coupon code was used on an order.
A commission earned through a code

These tracking coupons are not the same thing as the coupons an affiliate generates from their own earnings. Those are a way to spend a wallet balance and never credit anyone — see Pay Affiliates with Store Credit and Wallets.

FAQ

↑ Back to top

Does the customer have to click a referral link first?

↑ Back to top

No — that is the point of a code. Applying it at the cart or checkout is enough to credit the affiliate, which is what makes codes work for offline, audio and video promotion.

Can an affiliate earn commission on their own purchase with their code?

↑ Back to top

Yes, unless you prevent it. Turn on Restrict commission on own referral on the Commission screen — it is off by default, and most stores handing out codes will want it on.

Can I give one affiliate several codes?

↑ Back to top

Yes. Assign as many coupons to them as you like — each one credits them correctly. Only the most recent shows on their dashboard, so share the others with them yourself.

Where do I see which affiliate owns a coupon?

↑ Back to top

Open the coupon and look at Select Affiliate on the General tab. The coupons list does not show the owner as a column, so name your codes after the affiliate if you run many of them.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.