What is referral tracking?
Referral tracking is how a store works out which affiliate, a person or business that promotes the store, sent a customer. The affiliate shares a referral link: a web address with a tracking code that identifies them. When a customer opens the link and later completes an order, the store connects that order to the affiliate, who earns a commission: the reward for a referred sale.
What you will learn
- What a referral link and its tracking code contain
- How cookie consent affects whether a click is tracked
- Why the completed order, not the click, decides who gets credit
What is in a referral link
A referral link is an ordinary link to the store with extra text added to the end. The part that matters for tracking is the tracking code, a short ID that belongs to one affiliate. In Simple Affiliate links, the tracking code follows sacode=, so a link to a product page might look like https://example.com/products/backpack?sacode=e82c1s.
Optional UTM parameters
A referral link can also carry UTM parameters: standard labels, such as utm_source and utm_campaign, that analytics tools like Google Analytics read to report where visitors came from. They help you see affiliate traffic in your reports. The tracking code is what identifies the affiliate.
How a click becomes a tracked visit
When a customer opens a referral link, the store can save a tracking cookie, a small file in the customer's browser that remembers which affiliate sent them. If the customer comes back and buys later from the same browser, while the cookie lasts, the cookie still points to that affiliate.
Cookie consent comes first
Many shoppers see a cookie banner asking whether the store may save cookies. On a Shopify store, the store's customer privacy settings and the customer's consent choice decide whether a tracking cookie can be set at all. If a customer has not given the consent those settings require, opening a referral link may not create a tracking cookie, and without one the link cannot credit the affiliate for a later order.
Other reasons a click is not tracked
- Different devices: the customer opens the link on their phone and buys on a laptop. The cookie exists only on the phone.
- Cleared cookies or private browsing: clearing cookies removes the tracking cookie, and a private or incognito window may not keep it.
- Changed links: if the tracking code is removed or altered, for example by a tool that rewrites links, the visit may not be tracked.
This is why many programs also give affiliates a standard discount code, a reusable code assigned to the affiliate that the customer enters at checkout, the final step where the customer pays. A standard code does not depend on the customer opening the link first.
Why the completed order decides who gets credit
A click shows interest, not a sale. Many people open a link and leave without buying, so a store pays commission only when an order is completed. Attribution, the rule that decides which affiliate gets credit for a sale, therefore happens on the order, not on the click.
With Simple Affiliate, nothing is estimated from the click alone. After the customer completes the purchase through Shopify checkout, the order goes to Simple Affiliate, which connects it to the affiliate and applies the commission rules that were in effect when the referral was made. An order with no tracking signal (no tracked link visit, no affiliate discount code, and no connected customer, meaning a customer linked to an affiliate after a first referred purchase in a store that has turned on the Pro connected-customers feature) credits nobody.
For you as a store owner, this means you pay for real sales rather than clicks. For affiliates, it means a clear rule: ask customers to buy through the link, or to enter the affiliate's standard discount code at checkout.
To see how Simple Affiliate tracks referrals and what to check when a sale is missing, read How does referral tracking and affiliate attribution work in Simple Affiliate? in the help center.