Guide

How to track Stripe revenue by marketing channel

Updated October 14, 2026

In short

Pass the visitor ID into Stripe Checkout metadata, add a webhook for checkout.session.completed, and each payment is credited to the channel that brought the customer.

1. Pass the visitor ID to your server

On the page that starts checkout, read window.vast.visitorId and send it to your server with the checkout request.

2. Add it to the Checkout Session metadata

Create the session with metadata vast_visitor_id set to the value from step 1. For subscriptions, set it on subscription_data.metadata too so renewals are attributed.

3. Connect Stripe in Settings

In Visitor Fast, open Settings → Revenue, choose Stripe and paste a restricted read-only API key and your webhook signing secret. You get a private webhook URL; add it in Stripe for checkout.session.completed, invoice.paid and refund events. Every signature is verified before anything is stored.

4. Check the result

Complete a test purchase. The payment appears on the Overview and Sources pages with the visitor's source and campaign.

See revenue per channel on your own site

7-day free trial. No card required.

Start free trial