When to use server events
Use both together for the fullest picture: the browser SDK tracks the journey, and your server reports when a conversion actually happened.
How attribution works server-side
Thescan_session_id is the attribution link between a QR scan and a server event. Here is the typical flow:
scan_session_id from the browser to your server. Common ways to do this:
- Include it in a hidden form field
- Send it in the API request body from your frontend JavaScript
- Store it in the user’s session on your server (read it from the URL parameter when the page loads)
Requirements
- A tracking site created in Integrations → Conversion Tracking
- A site-scoped API key (generated in the tracking site’s API Keys tab)
- Your server can make outbound HTTPS POST requests
- You have a way to receive the
scan_session_idfrom the user’s browser
Security requirements
- Never expose your API key in frontend code or client-side JavaScript
- Store the key in an environment variable or secrets manager
- Rotate keys periodically from the dashboard
Next steps
Generate an API Key
Create a site-scoped API key from the dashboard.
Send Events
Code examples in cURL, Node.js, Python, and PHP.
Idempotency & Retries
How to safely retry failed requests.
Verify Delivery
Confirm your events are being received.