Guide · Revenue attribution

Revenue Attribution Without Cookies: How It Works

You can credit sales to traffic sources without cookies. How checkout tagging, daily ids and payment webhooks combine, and where cookieless attribution stops.

· 3 min read

Source lines meeting at a revenue target

Attribution used to mean cookies: drop an id on the first visit, read it at purchase, credit the source. Cookie banners, browser limits and privacy rules have made that harder. The good news: much of revenue attribution still works without storing anything in the browser.

What attribution actually needs

Only one thing: a way to connect the payment to the visit that led to it. A cookie is one way. It's not the only one.

When a visitor clicks "Buy", the link to the payment page can carry an id for that visit. The payment provider stores it with the payment and sends it back in its webhook. No cookie needed, because the id travels in the link.

  1. 1VisitThe script works out a visitor id for today, storing nothing
  2. 2Click BuyThe id is added to the checkout link
  3. 3PaymentThe provider keeps the id in the payment's metadata
  4. 4WebhookDataFair joins payment and visit, and credits the source
Checkout tagging without cookies

DataFair does this automatically for Stripe Payment Links, Lemon Squeezy, Gumroad, Creem and Dodo Payments checkout links. For checkouts you create on your server, window.datafair.attribution() returns the id to put in metadata.

Method 2: a daily id instead of a stored one

In DataFair's cookieless mode, the visitor id is worked out from a keyed hash of the day, your website, the IP address and the user agent. The IP address isn't stored, and the id changes every day. That's enough to join a visit to a purchase made the same day.

Method 3: match by customer

When a customer has bought before, or identified themselves (for example by signing up), later payments with the same email or customer id can be matched. Weaker than a tagged checkout, but useful for renewals and returning buyers.

Where cookieless attribution stops

Be honest about the gap: a visitor who reads your article on Monday and buys on Friday, in cookieless mode and without signing up in between, can't be joined through the id alone. That payment shows as unattributed. If most of your customers take days to decide, consider consent mode instead: nothing is stored until a visitor agrees, then a first-party cookie handles longer journeys.

SetupSame-day purchasesPurchases days later
Cookieless modeAttributedOnly via email or customer match
Consent mode, visitor agreedAttributedAttributed
Consent mode, visitor declinedNot trackedNot tracked

Revenue totals stay complete in every case, because payments come from your provider's webhooks, not the browser. Client side vs server side explains why.

Revenue by channel in DataFair
Revenue by channel in the DataFair demo (sample data).

Related guide: Revenue attribution for every payment provider.

Questions

Can you track conversions without cookies?
Yes. Tagging the checkout link and receiving payments by webhook attributes same-day purchases without any cookie.
Is cookieless attribution GDPR compliant?
No method is compliant by itself, but collecting less and storing nothing in the browser makes compliance simpler. [Our GDPR summary](/blog/is-google-analytics-gdpr-compliant) has the background; ask your adviser for your case.
Will my revenue totals be lower without cookies?
No. Revenue comes from your payment provider. Only the share matched to a source changes.

Related