Skip to content

How does cookie consent affect referral attribution?

Cookie consent determines whether Simple Affiliate sets its referral cookie, counts the click, and shows the referral popup. It doesn't block the affiliate code saved on the Shopify cart, so a referred order can still be credited even when a customer hasn't consented.

These storefront features run through the Simple Affiliate tracker. If you haven't turned on Simple Affiliate Tracker inside App embeds in your theme editor and clicked Save, none of them will run. Follow How to enable the Simple Affiliate tracker for setup instructions.

What needs consent

Simple Affiliate checks with Shopify on whether a customer can be tracked. It waits for a yes from Shopify before it does any of these:

  • Sets the saref cookie on your storefront
  • Counts a click on the link
  • Shows referral popups, including the claim popup used for single-use discount codes

Simple Affiliate doesn't judge what counts as enough consent on its own. Shopify makes that call based on the customer's consent choices, their country, and the privacy rules that apply. Choosing only Necessary cookies can allow tracking for one customer while stopping it for another.

Run Shopify.customerPrivacy.userCanBeTracked() in your browser console to check Shopify's current answer. It returns true or false.

How the referral cookie works

Simple Affiliate puts the saref cookie on your storefront domain for 90 days. It stores a signed token along with the affiliate's link code. You can view it under your store's cookies inside your browser's developer tools.

At checkout, the affiliate group's conversion window limits how long that cookie click counts.

Attribution without consent

Right when someone visits a referral link, the tracker adds an Affiliate code attribute to their Shopify cart without waiting for consent. That attribute stays on the cart until the customer checks out, clears it, or Shopify drops the cart. Simple Affiliate reads that attribute from the finished order.

Because the cart holds that code, a link referral can still be credited if the cookie was never set. It can also be credited past the conversion window for the cookie click, as long as the customer stays in that same cart.

Product attribution, connected customers, and discount codes typed at checkout don't rely on the cookie either.

When a referral is created

Simple Affiliate creates a referral when the customer places an order, not on a link visit. A counted click is only a statistic. It doesn't save a record that guarantees a future referral.