Skip to content
DocsTracking & attributionBrowser attribution

Browser attribution

After redirect, your merchant site receives velo_ref and click_id in the URL. Add the Capve snippet to every page so values survive client-side navigation.

Attribution snippet

Place in the document head of your site:

<script src="https://capve.app/api/v1/snippet" async></script>

The snippet reads velo_ref and click_id from the URL and stores them in localStorage. It does not call Capve from the browser.

Pass click ID to checkout

Before creating a Stripe Checkout session (or similar), read the stored click ID:

const clickId = localStorage.getItem("click_id");
const affiliateCode = localStorage.getItem("velo_ref");

await stripe.checkout.sessions.create({
  // ...
  metadata: {
    click_id: clickId ?? "",
    velo_ref: affiliateCode ?? "",
  },
});

In your payment webhook, read metadata.click_id and fire the Capve postback or server convert API.