Revenue attribution from visits to purchases

Tracwell attributes verified server-side purchases and refunds to a matching Product-mode session. It uses that session’s first acquisition context to connect revenue with a source, campaign, landing page, and recorded journey.

Carry the originating session into checkout

Capture the anonymous and session IDs from the SDK and pass them to your server-created checkout. Keep those identifiers in payment metadata so a verified payment can be sent back with the originating session context.

Send verified purchases and refunds

Verify the payment provider’s webhook on your backend, then send the confirmed transaction through the server revenue API with a server key. The public guide includes Stripe, Dodo Payments, and Polar examples. Installing the browser script or storing provider credentials does not import payments automatically.

Understand which visit receives credit

The first_touch_session_v1 model credits the acquisition context of the session attached to the payment. This is the first touch of that session, not necessarily the customer’s first-ever visit. Payments without a matching session remain visible as unattributed.

Connect a campaign visit to a purchase

Example workflow

  1. A visitor opens a tagged campaign URL with Product-mode collection enabled.
  2. Your backend creates checkout and preserves the visitor’s session identifiers.
  3. Your verified payment webhook sends the purchase using a server key and stable transaction identity.
  4. Review the revenue report’s source, campaign, landing page, and purchasing journey.
Implement server revenue tracking

What to keep in mind

Session identifiers provide attribution context, not authorization. Verify payment amounts and success on the server. Revenue attribution does not reconstruct missing sessions, merge devices, or prove that a campaign caused a purchase.

Why is a payment unattributed?

It has no matching recorded session. Check whether Product mode and consent allowed collection, whether the originating session IDs reached checkout metadata, and whether your backend included them in the revenue event.

Explore the connected reports

Start with your website

Connect Tracwell and verify your first event before building reports around it.