Sourcetrail for online stores: which channels bring orders, without cookies

How an online store can attribute orders to channels and campaigns with a cookie-free snippet, server-side purchase events and its own ad spend.

Use case · Updated · by the Sourcetrail team

Most online stores spend money in several places at once: paid search, social ads, influencers, a newsletter. Each ad platform reports its own conversions, and the totals add up to more orders than you actually had. Sourcetrail gives you one view: it records where each visit came from, receives your orders from your own backend, and splits the credit across channels with the model you choose.

How it fits a store

  1. Snippet on every page. Paste one script tag into the <head> of your storefront. It records each visit's source (referrer and UTM tags) with no cookies and no fingerprinting. It keeps a random visitor id in your site's localStorage. Browsers that send Do Not Track or Global Privacy Control send nothing.
  2. Orders from your backend. When an order is paid, your server posts a conversion event with the order value, currency and an idempotency key such as the order number. Retries are recorded once. Read the visitor id in the browser with sourcetrail('id'), pass it through checkout (for example in a hidden field), and include it in the event. Emails and user ids are hashed before storage. The server-side events article has the request format.
  3. Spend in. Enter ad spend per day, channel and campaign, or import the CSV exports your ad platforms provide. Sourcetrail doesn't connect to ad accounts automatically yet.
  4. Reports out. Revenue and conversions per channel and campaign, with cost per acquisition (CPA) and return on ad spend (ROAS) where you've added spend.

Why server-side orders matter

A browser "thank you page" pixel misses orders when the customer closes the tab, blocks scripts, or the payment provider redirects elsewhere. Sending the order from your backend, after payment is confirmed, means the conversion is recorded once, with the right value, whatever happened in the browser.

Choosing a model

Sourcetrail calculates five attribution models side by side, so you can see how sensitive your conclusions are:

ModelCredit goes toUseful for
First touchThe earliest visitWhich channels introduce new customers
Last touchThe latest visitWhat closes the sale
Last non-directThe latest visit that wasn't DirectIgnoring "typed the URL to buy" visits
LinearEqual shares across visitsA balanced view of longer journeys
Position-based40% first, 40% last, 20% middleValuing both discovery and closing

You set the lookback window. Revenue is split in whole cents so totals always add up. If a channel looks great under one model and poor under another, that is a finding in itself.

Visits are sorted into channels by an ordered list of rules, such as "utm_medium is one of cpc, ppc → Paid search". Edit the rules and past visits are re-classified immediately, because the raw tags are stored. Consistent UTM tags make this work; our UTM tagging guide has a naming scheme for stores.

Privacy by default

  • No cookies and no device fingerprinting.
  • IP addresses are never stored.
  • Do Not Track and Global Privacy Control are honoured.
  • Optional consent mode: turn on *Require consent* and nothing is stored or sent until your consent banner calls sourcetrail('consent', true).
  • Raw visit data is deleted after the retention period you set (30 to 1,095 days).

Whether you need consent for the snippet depends on your jurisdiction and your own policy; ask your adviser.

Honest limits

Attribution is an estimate. Visitors who block scripts, use several devices without logging in, or opt out aren't connected. Use it to compare channels and campaigns, not to account for every single order.

Plans

Free includes 1 site and 10,000 events a month (pageviews plus conversions), all models, the events API, ad spend entry and CSV exports. Pro is $99 a month excluding VAT for 20 sites and 1,000,000 events a month. Duplicates and dropped bot hits don't count. At the limit, new events stop being recorded until the 1st or an upgrade; there are no overage charges.

Try Sourcetrail free

Privacy-respecting marketing attribution: UTM tracking, server-side conversions, channel reports and ROAS. The Free plan needs no card; you can export or delete your data any time.