PageDuel Help
Revenue attribution

Browser and server purchase tracking

Send purchase value directly when a provider webhook is not the right fit.

Browser and server purchase tracking1Order confirmed2Visitor ID joined3Source & page attributed4Experiment impact
Browser and server purchase tracking

From the browser, call PageDuel.trackPurchase(amount, properties) only after checkout succeeds. From your server, send a revenue-bearing event to /api/track with the site's write key and optional visitor ID.

Server tracking is preferred when fulfillment or payment confirmation is authoritative outside the browser. Include a stable order identifier for troubleshooting and idempotency. Never expose a write key, send raw payment details, or emit the same purchase from both browser and server.