← All articles

How to Track Affiliate Sales on Shopify: Links, Coupons and COD Orders

Taguu Team · November 16, 2026 · 10 min read

If you pay affiliates, you need to know which orders they actually drove. Learning how to track affiliate sales on Shopify keeps commissions fair, keeps affiliates motivated, and shows you which partners are worth more budget. This guide covers the main tracking methods, what Shopify can and cannot show on its own, and how to handle cash on delivery (COD) orders that may never be paid.

Why affiliate sales tracking matters

Tracking is the base of every affiliate program. If it is weak, everything built on top of it breaks.

  • Fair payouts. Affiliates expect to be paid for every sale they send. If tracking misses orders, good partners lose trust and leave.
  • No overpaying. If tracking gives credit too easily, you pay commission on sales that would have happened anyway, or on orders that were later cancelled.
  • Better decisions. When you can see sales, revenue and returns per affiliate, you can raise rates for top performers and drop partners who send low-quality orders.
  • Fewer disputes. Clear records of which order was credited to whom, and why, make it easy to answer affiliate questions.

The 3 main ways to track affiliate sales

Most Shopify stores use one or more of these methods. Each one answers the same question in a different way: "Did this affiliate cause this order?"

1. Affiliate links with a referral code

Each affiliate gets a unique link to your store, such as yourstore.com/products/serum?ref=sara. When a shopper clicks the link, the referral code is saved, so a later order can be credited to that affiliate.

Strengths:

  • Works for any product or page you choose to link.
  • The shopper does not need to do anything extra.
  • Easy to share on social posts, bios, videos and chat apps.

Weaknesses:

  • If the shopper switches devices or clears cookies, the link can lose track.
  • Some in-app browsers (for example, inside social apps) can make tracking less reliable.

2. UTM parameters

UTM parameters are tags added to a link, such as utm_source=sara&utm_medium=affiliate&utm_campaign=summer. They tell your analytics tools where a visit came from. Many affiliate apps add UTM tags and a referral code to the same link.

UTM tags are great for reporting, but they work best when your naming is consistent. If one affiliate link uses instagram and another uses IG, reports will treat them as two different sources. Our guide to UTM parameters for affiliate links explains a simple naming system.

3. Affiliate coupon codes

Each affiliate gets a discount code, such as SARA10. When a customer enters the code at checkout, the order is credited to that affiliate.

Strengths:

  • Works even with no click at all. A follower can hear the code in a video, or read it in a story, and type it later.
  • Works across devices.
  • Very hard to lose, because the code is stored on the order itself.

Weaknesses:

  • Codes can leak to coupon websites, so some sales get credited to an affiliate who did not drive them.
  • Every coupon sale includes a discount, which lowers your margin.

For a full comparison, read affiliate coupon codes vs affiliate links.

Comparison table

Method Needs a click? Works across devices? Main risk Best for
Affiliate link + referral code Yes Not always Lost cookies, device switches Bloggers, link in bio, chat sharing
UTM parameters Yes Not always Messy or inconsistent naming Reporting and campaign analysis
Affiliate coupon code No Yes Code leaks to coupon sites Video, podcasts, offline mentions

Many stores use links and coupons together. That way, a shopper who clicks gets tracked by the link, and a shopper who only remembers the code still gets tracked by the coupon.

What Shopify shows on its own

Shopify has useful built-in reports, but it is not an affiliate tracking system by itself. Report names and features change over time, so check your own admin, but in general:

  • Discount reports (such as a "Sales by discount" report) show how many orders and how much revenue each discount code produced. If each affiliate has their own code, this gives you a rough view of coupon-based sales.
  • Acquisition and marketing reports (such as sessions or sales by referrer and by marketing campaign) use referrer data and UTM tags to show where visits and sales came from. If you do not use UTM tags, campaign reports can be empty.
  • Order details can show the discount code used on each order.

What Shopify's standard reports do not do for you:

  • Calculate a commission for each affiliate.
  • Decide which affiliate wins when two affiliates touched the same order.
  • Hold a commission until the order is delivered, then approve it.
  • Reverse a commission when an order is cancelled, refused or refunded.
  • Give each affiliate their own login to see their sales and payouts.

You can do some of this by hand with exports and spreadsheets when you have only a few affiliates. As the program grows, manual tracking becomes slow and error-prone. That is when most stores move to an affiliate app.

How attribution rules decide who gets credit

Attribution is the rule that decides which affiliate gets credit for an order. It matters most when more than one affiliate touched the same customer, or when a customer clicked a link and also used a code.

Common rules include:

  • Last click. The last affiliate link the customer clicked before buying gets credit. This is the most common rule in affiliate marketing.
  • First click. The first affiliate who sent the customer gets credit. This is less common.
  • Coupon priority. If a coupon code was used, the coupon owner gets credit, even if the customer clicked another affiliate's link earlier. This is a clear, easy-to-explain rule, because the code is stored on the order.

Whatever you choose, write it in your program terms so affiliates know how it works before they start. A clear rule prevents most disputes.

Cookie windows

When a shopper clicks an affiliate link, a cookie or similar record is saved. The cookie window is how long that record lasts. Typical starting points are 30 days, though some stores use shorter or longer windows. A longer window is more generous to affiliates. A shorter window gives credit only for quick buying decisions.

The extra challenge: tracking sales on COD stores

Cash on delivery adds two problems that card-only stores do not face as often.

Problem 1: Orders that are never paid

With COD, an order can be placed and then refused at the door, cancelled on a confirmation call, or returned. If you pay commission as soon as the order is placed, you may pay for sales that never brought in money.

The fix is to treat every new commission as pending, and only approve it after the order is delivered and paid. Many stores also add a short hold period after delivery to cover returns. Read more in our guide to COD affiliate marketing.

Problem 2: COD form apps

Many COD stores use form apps that let customers order from the product page without the standard checkout. Some tracking setups depend on the checkout to read the referral code, so orders placed through a form can lose their affiliate credit. When you choose a tracking tool, test a real COD form order with an affiliate link before you launch.

How to set up affiliate sales tracking: step by step

Here is a simple process you can follow, whatever tool you use.

  1. Choose your tracking methods. Decide whether affiliates get links, coupon codes, or both.
  2. Set your attribution rule. For example: coupon first, then last click. Write it down.
  3. Pick a cookie window. 30 days is a common starting point.
  4. Define when a commission becomes approved. For COD, wait until the order is delivered and paid, plus a short hold period.
  5. Define what reverses a commission. Cancelled, refused, returned and refunded orders should not earn commission. Decide how partial refunds are handled.
  6. Create a consistent UTM naming system. Use lowercase and the same source and medium values every time.
  7. Run test orders. Place a test order through an affiliate link, one with a coupon code, and one through your COD form if you use one. Confirm each is credited correctly.
  8. Give affiliates visibility. A portal or regular report showing their orders and earnings builds trust and cuts down on support questions.
  9. Review regularly. Check for unusual patterns each month, such as many orders from one phone number.

Common tracking mistakes to avoid

  • Paying on placed orders. On COD stores especially, wait for delivery.
  • Mixed UTM names. Facebook, facebook and fb split one source into three.
  • Ignoring self-referrals. Some affiliates buy through their own link to earn a commission on their own purchase. Check whether the order email or phone matches the affiliate. See our guide to affiliate fraud.
  • No written attribution rule. Without one, every disputed order turns into an argument.
  • Never testing. A broken link or form setup can cost weeks of missed credit before anyone notices.
  • Sharing customer data. Affiliates need to see their orders and earnings, not your customers' names, addresses or phone numbers.

Key metrics to track per affiliate

Once tracking works, look at more than just order count. Useful metrics include:

  • Clicks sent to your store.
  • Orders credited to the affiliate.
  • Conversion rate (orders divided by clicks).
  • Revenue from credited orders.
  • Delivery or approval rate. On COD stores, this shows how many orders were actually delivered and paid.
  • Refund and return rate.
  • Commission paid and commission as a share of revenue.

An affiliate with fewer orders but a high delivery rate may be worth more than one with many orders that are often refused.

How Taguu helps

Taguu is a Shopify affiliate app built for stores that sell on cash on delivery. For tracking, it gives you:

  • Affiliate links for any product with UTM tags and a ref code, plus an optional coupon code per affiliate that you create.
  • Clear attribution: affiliate coupon first, then UTM last click, then a referral cookie saved on the cart, which works with COD form apps. The last affiliate click wins.
  • COD-safe commissions: pending until the order is delivered (and paid for COD) plus a hold period (7 days by default). Cancelled, refused, returned and refunded orders are reversed automatically, and partial refunds recalculate.
  • Fraud checks that flag self-referrals and repeat customers through one affiliate.
  • An affiliate portal where affiliates see their orders, earnings and payouts, with no customer details shown.

There is a free plan for up to 50 affiliate orders per month and 0% fee on sales on every plan. You can install Taguu to try it on your store.

FAQ

Can I track affiliate sales on Shopify without an app?

Yes, partly. You can give each affiliate a unique discount code and check Shopify's discount reports, or use UTM tags and check marketing reports. But you will need to calculate commissions, handle cancellations and pay affiliates by hand, which gets hard as your program grows.

Which is more accurate, affiliate links or coupon codes?

Coupon codes are harder to lose because they are saved on the order, and they work across devices. Links are easier to share and do not require a discount. Using both together gives the most complete tracking.

How long should an affiliate cookie last?

A common starting point is 30 days. Choose a window that matches how long your customers usually take to decide, and state it in your program terms.

How do I track affiliate sales for cash on delivery orders?

Mark each commission as pending when the order is placed, then approve it only after the order is delivered and paid, plus a short hold period. Reverse commissions for refused, cancelled and returned orders. Also test that your COD form app keeps the affiliate referral.

What happens if two affiliates refer the same customer?

It depends on your attribution rule. Under last click, the most recent affiliate link wins. Many programs give priority to a coupon code if one was used. Write the rule in your terms so affiliates know in advance.

Launch your affiliate program this week.

Links, coupons and commission only on delivered orders. Free plan, and 0% of your sales on every plan.

Start free →