Revenue attribution
Browser and server purchase tracking
Send purchase value directly when a provider webhook is not the right fit.
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.