Skip to content

How does referral tracking work?

An order gets attributed to an affiliate in one of three ways: a referral link, a unique discount code, or a connected customer. Attribution comes first, then the commission calculation, and it only happens when the method's conditions are met. For links, that includes the Simple Affiliate tracker being on. Cookie consent controls the tracking cookie and click counts; the affiliate code on the Shopify cart can still attribute an order without that cookie.

Turn on the Simple Affiliate tracker first

The Simple Affiliate tracker is required to run referral links on your storefront. Turn on Simple Affiliate Tracker in your theme's App embeds and click Save. Until that is done, incoming referral traffic is not recorded, automatic discounts are not issued at checkout, and the default affiliate signup flow that most stores use does not run. Unique discount codes typed at checkout, and Pro connected-customer attribution after a first referred purchase, can still attribute an order without a storefront click. The Affiliate Signup theme block is Pro-only and optional; it can collect applications without the tracker, and you do not have to use it.

The how-to is at https://simple-affiliate.com/blogs/how-to-guides/how-to-enable-the-simple-affiliate-track-app-embed

The three attribution methods

Referral links carry a tracking code such as sacode and can include optional UTM parameters. When a customer visits through a link, Shopify's customer privacy and cookie-consent rules decide whether the tracking cookie can be set at all.

Discount codes work at checkout instead. With standard codes, a unique reusable code assigned to an affiliate identifies that affiliate when the customer applies it. With single-use codes, the customer claims a unique one-time code after clicking the affiliate's referral link; the reserved name on the affiliate is not a working Shopify code.

Connected customers are a Pro feature. With it enabled, a customer who completes a first referred purchase can become connected to the referring affiliate, and later purchases can stay associated with that affiliate under the feature's rules.

From click to commission

The customer opens the affiliate's link, or uses the affiliate's code during checkout. If Shopify's privacy requirements and the customer's consent permit it, the tracking cookie is set. The customer completes the purchase through Shopify checkout, the order flows to Simple Affiliate for referral and commission processing, and the commission rules in effect when the referral was made are applied.

Nothing is estimated from the click alone. The completed Shopify order, plus the rules at referral time, determines the result.

Rules that catch people out

  • Link clicks, referral popups, and link-based cookies need the Simple Affiliate tracker to be on and saved in the theme editor.
  • A link click may not create a tracking cookie when the customer hasn't granted the consent Shopify's privacy settings require.
  • Connected-customer attribution begins only after a first referred purchase, and only with the Pro feature enabled.
  • Built-in anti-spam controls can filter self-referrals, and can help filter suspicious affiliate signup activity too.

Pick methods to match how your customers buy. Links suit campaign tracking, codes work entirely at checkout, and connected customers keep attribution going when the Pro feature is active.

Changelog releases

This topic appears in the following release notes: