Connect your Stripe account to attribute revenue to visitor sessions. See which pages, referrers, UTM campaigns, and devices are driving your sales.
Persist mode is required for revenue attribution. It's the only way to associate a payment with a visitor, however this requires explicit consent for EU users. Learn more.
Here's an exact step-by-step tutorial on how to integrate Stripe.
We'll then automatically create a webhook endpoint for your Stripe account and Visitors will begin receiving transaction events from Stripe.
Without this we can't attribute transactions to real visitors. This will enable cookie-based tracking allowing you to read the visitor cookie.
Replace YOUR_TOKEN with your project token.
When a Stripe event comes in we resolve the visitor through a fallback chain:
Checkout metadata is the most reliable, if not we will then check for any previous purchase or subscription event that matches which might already have attribution, otherwise we will make a last ditch attempt to find a profile associated with that payments email.
When creating a Stripe Checkout session on your server, read the visitor cookie from the incoming request and pass it as metadata to your Stripe checkout.
If you can't pass the visitor cookie in every checkout (e.g. the purchase happens on a different domain), Visitors can still attribute revenue by matching the Stripe customer's email to an identified visitor.
Call visitors.identify() with the user's email when they sign in:
When a Stripe event comes in without visitor metadata, Visitors will look up the customer email and match it to the identified profile. This is less reliable than passing metadata directly, but acts as a useful fallback.
Learn more about identifying users.
If revenue is showing up but it's not being attributed, ensure that:
visitor cookie set by persist mode correctlymetadata when creating the checkout session.If you are doing all that and it's still not attributing correctly, contact our support team and we'll help you to diagnose the root cause.