Skip to main content
Attribution is only exact when the purchase carries the visitor id. The pixel exposes the current visitor id as window.trk.vid — pass it into your checkout and TrackRev joins the resulting charge to the click with certainty. Without it, TrackRev falls back to matching on email, which is a good safety net but not exact.
Read window.trk.vid in the browser at the moment you start checkout. On the server, the same value is available as the vid cookie.

Hosted checkouts: nothing to wire

If your buy buttons are hosted links or embeds — Stripe Payment Links, <stripe-buy-button>, <stripe-pricing-table>, Polar checkout links, Creem payment links, Dodo static payment links, or Paddle hosted checkouts — the pixel decorates them automatically with the visitor id in each provider’s format. You’re done; the sections below are for checkouts you create through a provider’s API.
To exclude a specific element from decoration, add data-trk-no-decorate to it. To see what the pixel decorated on a page, open it with ?trk_test=1 and check the browser console.

By processor

Checkout Session — set client_reference_id:
Payment Links / Pricing Table — append the id or set the attribute:
You can also set metadata.vid on the PaymentIntent as an alternative.

Verify it’s working

After wiring this up, go to Integrations → Verify your checkout setup → Check attribution setup. TrackRev inspects recent checkouts and confirms the vid is present and matching. See Connect Stripe → Verify your setup for what each result means.
The pixel must be running on the page where checkout starts so window.trk.vid is defined there. If the verifier says “vid unmatched”, that’s the usual cause.