Connect Payment Providers

DataSaaS connects your website traffic to actual revenue. When a visitor arrives on your site and later makes a purchase, DataSaaS attributes that revenue back to the original traffic source.

How revenue attribution works

  1. The DataSaaS tracking script assigns each visitor a unique datasaas_visitor_id cookie
  2. When a visitor clicks a checkout link, the script automatically injects this visitor ID into the checkout URL for supported providers (Stripe, LemonSqueezy)
  3. After purchase, DataSaaS matches the transaction to the visitor
  4. Revenue appears in your dashboard, attributed to the original source, campaign, and page

Connecting a provider

  1. Go to Dashboard → Settings → Revenue
  2. Select your payment provider (Stripe, LemonSqueezy, Polar, or Paddle)
  3. Enter your API key
  4. Click Connect

DataSaaS checks the connection immediately. If successful, you'll see a green "Connected" status with the last sync timestamp.

Supported providers

ProviderMethodsAuto-inject
StripeCheckout API, Payment Links, PaymentIntentYes
LemonSqueezyCheckout API, Payment LinksYes
PolarCheckout API, Checkout LinksManual
PaddleCheckout API, Overlay CheckoutManual

Supported currencies

USD, EUR, GBP, CAD, AUD, JPY, BRL, INR, TND. Select your preferred currency in Settings → Revenue. All revenue data in your dashboard will display in this currency.

Reading the visitor ID

For providers that don't support auto-injection, read the visitor ID from your frontend code:

javascript
function getVisitorId() {
  const match = document.cookie.match(/datasaas_visitor_id=([^;]+)/)
  return match ? match[1] : null
}

Manual sync

Click the Sync button in Revenue settings to manually pull the latest transactions from your provider. DataSaaS also syncs automatically on a regular schedule.

Tip

See the provider-specific guides for detailed setup instructions: Stripe, LemonSqueezy, Polar, Paddle.