Affilitrak Logo

Affilitrak

Pricing

Marketplace

For Shopify Apps

Resources

Login

Install Free

← Back to blog

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

Why Your Affiliate Links Are Not Tracking

If affiliate clicks record but orders never get credited, the break is almost always at checkout. Here is how third-party and express checkouts lose the ref code, and how to make attribution survive.

Published on September 8, 2026

by Fawaz

Why Your Affiliate Links Are Not Tracking

Why Your Affiliate Links Are Not Tracking

I've seen this scenario one too many times:

An affiliate swears they sent a sale.

Your dashboard shows their click and no order.

And the affiliate is usually not lying.

They clicked, they sent the traffic, and they expect the record to be there.

So your only reasonable conclusion is that the affiliate marketing app you're using is broken somehow.

In most cases, I can assure you that the "my affiliate app is broken" scenario is not the case.

You will come to realize that the app you're using works, and "links not tracking" is something you as a merchant can set up to avoid.

That's why in this article, I'll be explaining how affiliate links work and how you can ensure that your links track referrals.

An affiliate link's whole job is to attribute sales to the affiliate that referred the sale.

And the way it does that is by having a unique code assigned to the affiliate, and that code is used to attribute the sale to the affiliate.

This unique code is called the referral code or REF CODE, and it is seen in this format ?ref=codename at the end of your affiliate's referral link.

Example: https://​store.com/products/thing?ref=fawaz123

ref-code-example

One misconception I get from merchants is that tracking stops when you go to a separate collection on the same store and the REF CODE isn't on the collection URL.

I recently got a ticket from a merchant saying tracking doesn't work because when they went to a different page on their store, the REF CODE wasn't in that URL.

Yes, the referral code disappears from the URL when you go to another page, but that doesn't affect the attribution process at all.

In fact, this is where the attribution process gets more seamless.

Because from here, the entire attribution process is done by what we call cookies.

When a customer clicks on this link, they immediately get the affiliate's referral code as a cookie which is embedded and tied to your store's domain in their browser.

That means the credit stays with the affiliate no matter where the customer goes next on your store.

The product page, every collection, the cart, the checkout.

It also survives a lot more than a page reload.

The customer can close the tab, shut their browser, and come back three days later by typing your store name straight into the address bar.

The cookie is still there, and the affiliate still gets the credit.

That covers the overwhelming majority of purchases. But it does not cover all of them, because the cookie has one requirement: it has to still be readable at the moment the order is created.

Anything that breaks the path between the click and the order breaks the attribution with it.

The paths that lose attribution

1. Using a checkout that replaces Shopify's own

Some third party apps and platforms take the customer out of Shopify's native checkout entirely, or rebuild it.

The visitor's browser data belongs to your storefront domain, and a checkout running in a different context cannot read it.

Unless the referral was written onto the cart before the handoff, the order arrives with nothing attached and the sale is not given to the affiliate.

If you run a third party checkout, check whether it preserves cart attributes before you launch a program.

If it does not, you are choosing between that checkout and reliable link attribution, and it is worth making that choice deliberately rather than discovering it through a support ticket.

Shopify's native checkout handles this without any setup.

If you don't know how to check, you can reach out to the Affilitrak team to help you out.

2. Using express payment buttons

Shop Pay, Apple Pay, Google Pay and PayPal buttons on a product page can send the customer straight into a payment sheet, skipping the cart page.

The order still lands in your Shopify admin as normal.

What is missing is the referral, because the code never got attached to the cart on the way through.

If your attribution is attached at the cart step, it never happens.

The tell is specific and useful: orders through express buttons are missing while ordinary checkouts credit fine.

3. Using a subscription app for recurring orders

The first order in a subscription usually tracks fine.

A real person clicked, the cookie was set, and they checked out in a browser.

But every renewal after that is created by the subscription app on a schedule.

There is no browser involved and no cookie to read, so there is nothing for the app to match the order against.

This is why you sometimes see an affiliate credited once for a customer and never again.

It is not a bug. It is a decision you have to make: do affiliates earn on renewals or only on the first order? Decide that, then set your program up to match.

4. Running your storefront and checkout on different domains

Cookies are tied to one domain.

That is the whole point of them and it is also where merchants get caught out.

If you run your landing pages through a funnel builder or a page builder on its own domain, the REF CODE cookie gets set on that domain.

Then the customer is handed over to your Shopify store to pay, and the cookie does not travel with them.

The same thing happens with any setup where people browse on one domain and check out on another.

5. Post-purchase upsells

An upsell that a customer accepts after checkout usually creates a second, separate order.

Your affiliate gets credited for the first order and not the second one.

This one is sneaky because tracking looks like it is working. You only notice when you compare the commission against what the customer actually spent.

alt-text

A way around cookies: coupon codes as an attribution method

Everything above has the same root cause.

The attribution lives in the customer's browser, and browsers are fragile.

Change the checkout, change the domain, or take the browser out of the process, and the attribution is gone.

This matters more than it sounds because of how affiliate traffic actually behaves.

In our data across 1,178 Shopify affiliate programs, around 80% of affiliate referral traffic is mobile, and about a quarter of referral visits arrive with no identifiable referrer at all, which is what links shared in DMs and link in bio look like.

Mobile traffic and express checkouts go together.

So the traffic most likely to lose its cookie is also the traffic making up most of your program.

The way around it is to stop depending on the browser at all.

A discount code is part of the order itself.

It is not stored in a cookie, it does not belong to a domain, and it does not care which checkout the customer went through.

If a code is on the order, it is on the order.

Every checkout that accepts discount codes preserves it.

That is why coupon tracking has been around as long as affiliate marketing has, and why serious programs run links and codes together instead of choosing one.

But coupon codes have their own weakness, and it is a big one.

The customer has to actually use the code.

They have to remember it from the caption or the video, keep it in their head while they shop, and type it correctly at checkout on a phone.

Plenty of them do not. So you trade one failure point for another.

The fix is to stop asking them to do anything.

With Affilitrak, the affiliate's link applies their discount automatically the moment the customer clicks it.

The affiliate shares one link.

The customer types nothing.

The discount is already sitting on the order by the time they reach checkout.

That gives every sale two independent ways back to the affiliate: the cookie if it survives, and the code on the order if it does not.

So when a third party checkout or an express payment button wipes the cookie, the sale still gets attributed correctly.

How to test every checkout path on your store

Most merchants test tracking once, see it work, and assume they are covered.

The problem is that they test the normal checkout, which is usually the one that works.

Test each path separately instead. It takes about ten minutes.

  • Open a private browser window for each test so you start clean.
  • Click the affiliate's real link, the exact one they are sharing, not one you rebuilt yourself.
  • Add to cart and check out normally. Confirm the order credits.
  • Repeat, but this time use an express payment button on the product page.
  • Repeat with a subscription product if you sell one.
  • Repeat with the affiliate's coupon code instead of their link.
  • If you use a funnel or landing page builder, start the test from one of those pages.

Whichever path fails is your answer.

If you would rather not do this alone, our support team will run these checks on your store with you.

One last thing worth checking before you blame the checkout: make sure the link itself is built correctly.

Affiliates who type their link by hand instead of generating it often end up with a broken one, and our guide on how to create affiliate links for Shopify shows the format it should be in.

Before you start: do not run these tests while logged in as the affiliate.

Affilitrak and most apps block self referrals, so every test will come back as a false negative and you will have wasted the ten minutes.

You can turn this off in the Affilitrak settings page for the duration of your testing.

When it looks like a tracking failure but is not

Some of the tickets I get are not tracking problems at all.

Knowing the difference saves you from tearing your setup apart for nothing.

  • The customer switched devices: They clicked on their phone at lunch, and bought on a laptop that night. No cookie based system on the market can follow that.
  • The cookie expired: Every referral cookie has a lifespan, and once it passes, the sale no longer belongs to that affiliate. Thirty days is the standard most merchants used based on our own data and it covers almost everything, which is why I would check this one last rather than first. I explained the reasoning behind that in how long an affiliate cookie should last.
  • The order was refunded or cancelled: Commissions reverse when the sale reverses. A commission that showed up last week and disappeared this week is almost always this.
  • The affiliate is not approved yet: Clicks and orders can still record while commission accrual is switched off. Check their status before you check anything else.
  • The order came in through POS or a draft order: Those are created outside the online store and carry no referral information.

Conclusion

Affiliate links tracking correctly comes down to one thing: the REF CODE has to still be attached when the order is created.

The link and the cookie handle that fine on their own, right up until something interrupts the path between the click and the order.

Third party checkouts, express payment buttons, subscription renewals, separate domains and post purchase upsells all interrupt it in different ways.

So test each of those paths on your own store, switch back to Shopify's native checkout where you can, and stop relying on the browser as the only place your attribution lives.

Because the merchants who never deal with this are not the ones with better cookies.

They are the ones whose attribution is sitting on the order where nothing can touch it.