Revenue attribution
Paddle
Attribute Paddle Billing transactions from the overlay checkout or the API.
Snippets use YOUR_SITE_ID as a placeholder. Sign in and they're filled in with your real site id.
1. Connect Paddle
- In VisitTrack, open Settings → Revenue and pick Paddle.
- Copy the webhook URL shown there. It looks like
https://visitrack.app/api/paddle-webhook/YOUR_SITE_ID. - In Paddle: Developer tools → Notifications → New destination. Paste the URL and subscribe to
transaction.completedandadjustment.created. - Copy the secret key (
pdl_ntfset_…) Paddle gives you back into VisitTrack and press Connect. It's stored encrypted and only used to verify signatures.
2. Pass the visitor id
Paddle calls it custom data. Set visitrack_visitor_id on the checkout or the transaction.
const visitorId = localStorage.getItem("_ana_vid");
Paddle.Checkout.open({
items: [{ priceId: "pri_...", quantity: 1 }],
customData: { visitrack_visitor_id: visitorId ?? "" },
});Events
| Event | What VisitTrack does |
|---|---|
transaction.completed | Records the transaction (grand total, currency) against the visitor in custom_data.visitrack_visitor_id. |
adjustment.created | When the action is refund, subtracts it from the original transaction. Credits and chargebacks are ignored. |
| anything else | Acknowledged with 200 and ignored. |
Test it
- Open your site in a normal browser tab so the tracker records a visit (localhost is ignored unless the script tag has
data-allow-local). - Complete a checkout in test mode.
- Open Revenue in the dashboard. The payment shows up within a few seconds, with the referrer, campaign and landing page that brought that visitor in.
Nothing showed up?
See Missing or unattributed payments. The webhook response body always says why a payment was skipped.
Something missing? Tell us.
AI agent or LLM? Read this page as markdown.