Skip to content

Install on Shopify

How does referral tracking work?

An order gets attributed to an affiliate by a referral link, a unique discount code, a connected customer, or product attribution. 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 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. If a customer clicks more than one affiliate's link, the most recent click is the one that counts. A click counts for the conversion window of the affiliate's group, 30 days by default (Groups > Commission tab).

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.

Product attribution is a Premium feature. You assign a product to an affiliate with the Affiliate Attribution block on the product page in Shopify Admin, and that affiliate earns commission on sales of the product, even without a link or code. Product attribution does not apply when the order also has a product that is assigned to a different affiliate.

When more than one method applies to an order, product attribution comes first, then discount codes, then links, then connected customers. An order has one referral. You can also assign a referral by hand in Referrals > Add referral.

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.
  • Affiliates earn commission on their own orders by default. To stop that, turn off Self-referral in Settings > Referral.
  • Shopify draft orders do not create link referrals. Discount codes and connected customers still work on them.

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: