• Docs
  • MCP
  • Pricing
Live demo
Get started
  • Get started in 3 steps
  • Track custom goals
  • Use tracking parameters
  • Filter your data
Installation guides
  • All guides
  • Next.js
  • React, Vite and React Router
  • Vue.js
  • Astro
  • WordPress
  • Shopify
  • Webflow
  • Framer
  • Squarespace
  • Wix
  • Google Tag Manager
  • Lovable, Bolt and v0
Revenue attribution
  • Connect a provider
  • Attribution guide
  • Stripe Checkout API
  • Stripe PaymentIntent API
  • Stripe Payment Links
  • Stripe other methods
  • Polar Checkout API
  • Polar Checkout Links
  • Polar other methods
  • Lemon Squeezy Checkout API
  • Lemon Squeezy Payment Links
  • Lemon Squeezy other methods
  • Paddle Checkout API
  • Paddle Overlay Checkout
  • Paddle other methods
  • Dodo Payments
  • Payment API
Proxy guides
  • Get started
  • Next.js
  • Vercel
  • Netlify
  • Cloudflare
  • Nginx
  • Managed proxy
Advanced features
  • Script configuration
  • GDPR and cookieless tracking
  • User identification
  • Exclude visits
  • Error tracking
  • Session replay
  • Bot traffic tracking
  • Export data
  • Public embed
  • Metrics explained
  • Cross-domain tracking
MCP
  • Get started
  • Tool reference
  • OAuth reference
API reference
  • Get started
  • Authentication and scopes
Account
  • Get account
Websites
  • List websites
  • Get website
Analytics
  • Get metadata
  • Get overview
  • Get time series
  • Get realtime
  • Get realtime map
  • Get goals
Breakdowns
  • Get pages
  • Get referrers
  • Get campaigns
  • Get countries
  • Get regions
  • Get cities
  • Get browsers
  • Get operating systems
  • Get devices
Errors
  • List errors
Bot traffic
  • Get bot traffic summary
  • Get bot traffic pages
  • Report a crawler request
Visitors
  • List visitors
  • Get visitor
Payments
  • Create a payment
  • Delete a payment
Troubleshooting
  • Fix CSP blocking the script
  • No data showing
  • Duplicate payments
Docs menu
Get started
  • Get started in 3 steps
  • Track custom goals
  • Use tracking parameters
  • Filter your data
Installation guides
  • All guides
  • Next.js
  • React, Vite and React Router
  • Vue.js
  • Astro
  • WordPress
  • Shopify
  • Webflow
  • Framer
  • Squarespace
  • Wix
  • Google Tag Manager
  • Lovable, Bolt and v0
Revenue attribution
  • Connect a provider
  • Attribution guide
  • Stripe Checkout API
  • Stripe PaymentIntent API
  • Stripe Payment Links
  • Stripe other methods
  • Polar Checkout API
  • Polar Checkout Links
  • Polar other methods
  • Lemon Squeezy Checkout API
  • Lemon Squeezy Payment Links
  • Lemon Squeezy other methods
  • Paddle Checkout API
  • Paddle Overlay Checkout
  • Paddle other methods
  • Dodo Payments
  • Payment API
Proxy guides
  • Get started
  • Next.js
  • Vercel
  • Netlify
  • Cloudflare
  • Nginx
  • Managed proxy
Advanced features
  • Script configuration
  • GDPR and cookieless tracking
  • User identification
  • Exclude visits
  • Error tracking
  • Session replay
  • Bot traffic tracking
  • Export data
  • Public embed
  • Metrics explained
  • Cross-domain tracking
MCP
  • Get started
  • Tool reference
  • OAuth reference
API reference
  • Get started
  • Authentication and scopes
Account
  • Get account
Websites
  • List websites
  • Get website
Analytics
  • Get metadata
  • Get overview
  • Get time series
  • Get realtime
  • Get realtime map
  • Get goals
Breakdowns
  • Get pages
  • Get referrers
  • Get campaigns
  • Get countries
  • Get regions
  • Get cities
  • Get browsers
  • Get operating systems
  • Get devices
Errors
  • List errors
Bot traffic
  • Get bot traffic summary
  • Get bot traffic pages
  • Report a crawler request
Visitors
  • List visitors
  • Get visitor
Payments
  • Create a payment
  • Delete a payment
Troubleshooting
  • Fix CSP blocking the script
  • No data showing
  • Duplicate payments
Datasense

Cookieless analytics with live visitors, console errors and exports, served from your own domain.

Product

  • Features
  • Error tracking
  • AI crawler tracking
  • Revenue attribution
  • Ad-block proxy
  • Pricing
  • Live demo

Docs

  • Get started
  • Install guides
  • Growth guides
  • Ad-block proxy
  • MCP server
  • REST API

Compare

  • vs Google Analytics
  • vs Plausible
  • vs DataFast
  • vs Fathom
  • All alternatives

Company

  • FAQ
  • Terms
  • Privacy
  • Refunds
  • Cookies
  • DPA
© 2026 DatasenseNo cookies were set on this page.

Attribute revenue to your traffic sources

Choose your payment provider and the attribution method that fits your checkout: metadata, payment links or the customer's email.

Revenue attribution ties each payment to the visit that led to it, so every breakdown shows revenue next to visitors: which referrers, campaigns and landing pages bring paying customers.

First connect your payment provider. Then link payments to visits in one of three ways:

Method How Best for
Checkout API Pass datasense_visitor_id and datasense_session_id as checkout metadata. Checkouts you create in code. The most reliable.
Payment links Send buyers back to your site with the provider's payment ID in the URL. No-code links and hosted checkouts.
Customer email Call datasense("payment", { email }) on your success page. Anything else: custom flows, Elements, mobile.

Guides

  • Stripe: Checkout API, PaymentIntent API, Payment Links, other methods
  • Polar: Checkout API, Checkout Links, other methods
  • Lemon Squeezy: Checkout API, Payment Links, other methods
  • Paddle: Checkout API, Overlay Checkout, other methods
  • Dodo Payments
  • Any other provider

How attribution works

Datasense finds the visitor behind each payment, most exact first, and never guesses:

Signal Set up
The visit in the payment: checkout metadata, or a payment link the script tagged Metadata: one line in your checkout code. Payment links: nothing.
The payment's ID on your success page Nothing, if the provider redirects to your site.
An earlier payment by the same customer (renewals, repeat purchases) Nothing.
The customer's email, from datasense("identify", id, { email }) or datasense("payment", { email }) One line, often already there.
  • The payment is credited to the visitor's last visit with a real source in the 90 days before it, so "clicked a tweet, came back a week later by typing the URL and paid" goes to the tweet. Returning from a checkout page never counts as a source.
  • In breakdowns it counts toward that visit's landing page, referrer, campaign, country and device, even when the visit was before the selected range.
  • Webhooks, payment links and success pages resolve to the provider's own payment ID, so a payment is recorded once however it arrives.
  • Revenue excludes tax collected by the provider.
  • Settings → Revenue shows how many of the last 30 days' payments were tied to a visit, and how. Match again re-checks the rest.
  • Refunds take a payment out of revenue. Revenue is shown net of refunds.
  • Renewals and free trials are stored, but don't count a visitor as a new customer.
  • A payment without a visit still adds to revenue, without a source.
Read this page as markdownllms.txt
PreviousConnect a providerNext Stripe Checkout API

On this page

  • Guides
  • How attribution works
Sign in