All docs

Sources & attribution

Channels

Four signals name a visit’s channel, strongest first: an ad click id, UTM tags, a ?ref= value, then the referrer. The result is one of Organic Search, Paid Search, Organic Social, Paid Social, AI Assistant, Email, Affiliate, Display, Referral or Direct.

Since tags outrank the referrer, a tagged link always gives you the cleanest answer.

In-app browsers

Apps open links in their own built-in browser, and that browser usually drops the referrer. Its user agent still gives the app away, so the visit goes to the app instead of Direct. This covers Threads, Instagram, Facebook, TikTok, LinkedIn, Pinterest, Snapchat, Reddit, Discord, Telegram, Slack, WeChat and the Google app.

One gap: X’s iPhone app looks exactly like Safari. Tag what you post there with ?ref=x or a campaign link.

Direct, split in three

Label Who ends up here
Direct · typed or bookmark Someone who has been before, or a first-time desktop visitor arriving at your home page.
Direct · shared link A first-time visitor with no referrer who lands deep in the site or arrives on a phone. Usually a link pasted into a chat, an email or a notes app.
Checkout return A buyer on their way back from the provider’s payment page. Last non-direct credit skips these, so an earlier visit keeps the sale.

Attribution models

Each site picks one under Setup → Revenue attribution. Changing it also re-credits past sales.

  • Last non-direct (the default) gives the sale to the most recent visit that had a real source.
  • First touch gives it to the visit that first brought the buyer to your site.
  • Last touch gives it to the visit right before the purchase, whatever its source.

How a sale finds its visitor

DataPenny tries these in order and stops at the first match:

  1. Subscription. A renewal goes to whoever started the subscription.
  2. Checkout metadata. The visitor id travelled with the payment.
  3. Stripe client reference, when it holds an id DataPenny knows.
  4. Thank-you page. The script saw this payment’s id in the URL, such as ?payment_id=.
  5. Same customer. An earlier payment has the same customer id or email.
  6. Identified email. You called identify with the buyer’s email.
  7. Checkout timing. One visitor, and only one, clicked through to checkout during the 3 hours before the sale.

When several people clicked, the sale waits half an hour. It then goes to the one person who returned from checkout or, failing that, the one person who clicked in the half hour before paying. If neither test leaves a single name, the sale stays unmatched and shows the reason beside it.

Anything matched on timing alone wears an Estimated badge until proof replaces it. Prefer certainty? Switch timing off under Setup → Revenue attribution, and existing estimates are cleared. For older sales, the Revenue page has a Match unattributed sales again button.

Sales, upgrades and renewals

A payment is a new sale, an upgrade or a renewal. A renewal stays with the source of the subscription’s first payment, and a refund comes off the source of the payment it reverses. A $0 sign-up isn’t a sale, and when a free trial turns into its first real charge, that charge counts as new.

If renewals swamp your numbers, switch off Count subscription renewals in revenue. Revenue, sales, conversion, the chart, sources, funnels, the digest and AI agents then show only what new business brought in. Renewals remain on the Revenue page with a not-counted label, and lifetime value still includes them.

Setup → Campaign links makes a tagged URL for wherever you’re posting. Give the post a name and its visits and sales get their own campaign row, which also works on platforms that hide the referrer. Before you copy the link, the builder shows which source and channel it will record.

Privacy modes

Setup → Privacy decides how a site recognises people. There’s no code to change: the script reads the mode from the reply to its first event, and writes nothing to the browser until then.

Mode How it behaves
First-party cookies (default) Suits long buying cycles: a purchase weeks after the visit still finds that visit.
Cookieless The browser keeps nothing. Recognition comes from hashing a random salt with the site, the IP and the browser, and a new salt comes in every day. Old salts are gone after two days, so a sale can only match a visit from the same day.
Cookieless until consent Starts cookieless. datapenny('consent', true) from your banner switches to cookies, and datapenny('consent', false) deletes them.

Bots

Crawlers, headless browsers and anything from a hosting network never reach your reports. They’re dropped on arrival and tallied under Setup → Data.