Affilitrak Logo

Affilitrak

Login

Start Free

← Back to blog

Need setup details while you read? Visit the Help Center.

How to Track Affiliate Sales on Shopify

If you run an affiliate program, tracking sales accurately is the whole game. It decides who gets paid, how much, and whether your affiliates trust you enough to keep promoting your store. Get it wrong and you'll either overpay, underpay, or lose affiliates who feel cheated.

Published on June 2, 2026

by Fawaz

How to Track Affiliate Sales on Shopify

If you run an affiliate program, tracking sales accurately is the whole game.

It decides who gets paid, how much, and whether your affiliates trust you enough to keep promoting your store.

Get it wrong and you'll either overpay, underpay, or lose affiliates who feel cheated.

The catch is that Shopify doesn't track affiliate sales on its own.

This guide explains how affiliate tracking really works, how to set it up properly, and how to check that it's crediting the right people.

Why Shopify can't do this alone

Shopify is built to run your store, not to manage an affiliate program.

It does capture UTM tags and ?ref= links when a customer lands, and stores them on the order.

So it can show you where a sale came from.

In theory, you could give each affiliate a unique tag and tally their sales from it.

In practice, it's built for marketing reports, not affiliate payouts.

It only logs the visit if the customer accepts cookies first.

It's last-click and session-based, so it forgets anyone who comes back later.

And it ignores every click that doesn't end in a sale.

You can still try to run a program off it with a spreadsheet, but it's fragile and manual.

And it won't reliably tell you:

  • Which affiliate drove a given sale
  • How many clicks turned into orders
  • What commission each affiliate has earned
  • Whether a sale should be credited at all

That's the gap a dedicated tool fills, which is why every serious affiliate program on Shopify runs on affiliate tracking software.

How affiliate sales tracking works

Before setting anything up, it helps to understand the mechanics.

Affiliate tracking comes down to three pieces working together.

  • The affiliate link; carries a unique identifier that says who sent the visitor
  • The tracking cookie; stores that identifier in the visitor's browser when they click
  • The attribution rule; decides who gets credited if more than one affiliate is involved

Here's the flow in plain terms:

  • A customer clicks an affiliate link
  • A cookie is saved in their browser, tagged with that affiliate's ID
  • The customer shops as normal
  • If they buy before the cookie expires, the order is matched back to the affiliate
  • The system records the sale and calculates the commission

The link, the cookie, and the attribution rule all have to line up for tracking to work.

A link with a code on the end does nothing on its own unless software is recording the click and tying it to a completed order.

The two main ways affiliate sales are tracked

Most apps track sales through one or both of these methods and it's worth knowing the difference.

This is the standard method.

Each affiliate gets a unique tracking link, and any sale that happens after a click on that link (within the cookie window) is credited to them.

This tracking system:

  • Works automatically once set up
  • Relies on the cookie surviving until checkout
  • Best for affiliates promoting through blogs, social media, and email
  1. Coupon code tracking

Here each affiliate gets a unique discount code instead of, or alongside, a link.

When a customer uses that code at checkout, the sale is credited to the affiliate who owns it.

This tracking system:

  • Doesn't depend on cookies at all, so it survives even if the cookie is blocked or expired
  • Doubles as an incentive, since the customer gets a discount
  • Great for influencers and creators who share a code verbally or on video

Using both together is the most reliable setup.

If the cookie fails, the coupon code still catches the sale.

Step 1: Install affiliate tracking software

You can't track affiliate sales manually with a spreadsheet once you have more than a couple of affiliates. It breaks down immediately. The reliable route is a dedicated app.

A good affiliate tool will automatically:

  • Generate a unique link and code for each affiliate
  • Record every click against the right affiliate
  • Tie completed Shopify orders back to the correct affiliate at checkout
  • Calculate commissions based on your rules
  • Show the results in a dashboard for you and your affiliates

This is exactly what Affilitrak handles.

Once it's installed on your store, tracking runs automatically and you don't have to touch any code.

The Help Center covers the setup if you get stuck.

You can also reach out to our support team if you need help with anything.

Once tracking is installed, decide the rules that govern how sales get credited.

  • Cookie duration is how long after a click an affiliate still earns commission. Thirty days is a common, balanced choice for most stores.

  • Attribution model decides who wins if a customer clicks more than one affiliate link.

These settings directly affect who gets paid, so set them before you launch rather than changing them later and confusing your affiliates.

Step 3: Test your tracking before launch

Never assume tracking works.

Test the full path yourself before any real affiliate relies on it.

Here’s what a simple test should look like:

  • Click an affiliate link as if you were a customer
  • Confirm the cookie is being set
  • Place a test order
  • Check that the sale appears credited to the right affiliate in your dashboard

Then repeat the test with a coupon code to confirm that method works too.

If both land on the correct affiliate, your tracking is solid.

If not, you've caught the problem before it cost anyone a commission.

On Affilitrak, we have a dedicated manual orders page where you can test if the tracking works plus you can also reach out to our support team to test tracking for you.

Step 4: Monitor your sales and reports

Tracking isn't just about crediting sales.

It's also how you learn what's working.

Once your program is running, keep an eye on:

  • Top affiliates by sales, so you know who to reward
  • Conversion rate, meaning how many clicks turn into orders
  • Total commission owed, so payouts never catch you off guard
  • Inactive affiliates, so you can re-engage them before they go quiet

Good reporting turns your affiliate program from a guessing game into something you can actually grow on purpose.

Common mistakes when tracking affiliate sales

The errors that quietly break affiliate tracking:

  • Assuming Shopify tracks affiliate sales natively (it doesn't)
  • Relying only on links and ignoring coupon codes, so blocked cookies mean lost sales
  • Never testing the setup, so a broken tracker goes unnoticed for weeks
  • Setting cookie duration or attribution rules after launch and confusing affiliates
  • Not checking reports, so you miss which affiliates are actually driving revenue

Most of these disappear the moment you use proper affiliate software and test it before going live.

Conclusion

Tracking affiliate sales on Shopify comes down to one thing and that’s “having a system that reliably connects each sale back to the affiliate who earned it.”

That means unique links, coupon codes as a backup, sensible cookie and attribution rules, and a quick test before you launch.

Get that foundation right and everything else, from commissions to payouts to reporting, works on top of it.

Get it wrong and you'll spend your time chasing tracking errors and rebuilding trust with affiliates.

When you're ready, you can start free with Affilitrak and have accurate affiliate sales tracking running on your store in minutes.