Revenue Attribution
Revenue attribution is DataSaaS's core differentiator. Instead of just knowing how many visitors you get, you know exactly how much revenue each traffic source generates.
How it works
Visitor arrives → DataSaaS assigns visitor_id cookie
→ Visitor browses your site (tracked)
→ Visitor clicks checkout
→ visitor_id is injected into checkout URL
→ Payment completes
→ DataSaaS matches payment to visitor
→ Revenue attributed to original source
→ Visitor browses your site (tracked)
→ Visitor clicks checkout
→ visitor_id is injected into checkout URL
→ Payment completes
→ DataSaaS matches payment to visitor
→ Revenue attributed to original source
The tracking script automatically injects the datasaas_visitor_id into checkout URLs for Stripe and LemonSqueezy. For other providers, you can pass the visitor ID manually.
Reading the visitor ID
Access the visitor ID from your frontend code:
javascript
function getVisitorId() {
const match = document.cookie.match(/datasaas_visitor_id=([^;]+)/)
return match ? match[1] : null
}Provider-specific guides
- Stripe — Checkout API, Payment Links, PaymentIntent
- LemonSqueezy — Checkout API, Payment Links
- Polar — Checkout API
- Paddle — Checkout API, Overlay Checkout
Tip
For Stripe and LemonSqueezy, the tracking script auto-injects the visitor ID into checkout URLs. You don't need to write any extra code for these providers.