Use this guide when your backend is a Node.js service, a PHP application, or any stack not covered by the platform-specific recipes. Every example calls POST /v1/events — the same endpoint regardless of your infrastructure.
For the full field reference, identity rules, deduplication behaviour, and the batch endpoint, see the Server-Side Events guide.
Browser tracking
Install the Dáva tracking snippet on every landing and destination page so browser-side events (page views, clicks, form submits) flow automatically. Server events enrich that existing journey — they do not replace browser tracking.
Server events
All three examples below post a conversion event for a completed purchase. Replace dava_sk_live_... with your API key from Settings → Workspace → Settings & Integrations (API Keys card) and yourcompany.com with your Dáva-registered subdomain.
subdomain is required when calling api-v2.davazmysel.com directly. If you have configured a custom-domain install (your own hostname registered in Dáva), omit subdomain — Dáva reads the domain from the Host header instead. See Sending a single event for details.
Identity
At least one of anonymous_id, contact_id, or hashed_email is required — the request is rejected with 400 if all three are absent. Use whichever identity signals you have:
anonymous_id — the Dáva cookie value from the visitor’s browser session.
contact_id — your own customer or contact ID.
hashed_email — SHA-256 hex of the customer’s email address (with or without a sha256: prefix).
Deduplication
event_id and transaction_id are your dedup keys. If a network retry or queue redelivery sends the same event twice, Dáva collapses it to one canonical event and returns 200 with deduped: true. See Deduplication for the full priority chain and merge behaviour.
Hybrid setup (recommended)
A hybrid setup pairs the browser snippet with server-confirmed events, linking both onto the same visitor journey using dava_session_id.
The flow:
- The browser snippet loads on your page and creates a session.
- Your frontend JavaScript reads the session ID:
window.dava.sessionId
- The frontend passes that value to your backend — via a hidden form field, a cookie, a custom request header, or your own API call body.
- Your backend reads it from wherever the frontend placed it and includes it as
dava_session_id in the server event payload.
The backend cannot read window.dava.sessionId directly — that is a browser object. The frontend must collect it and pass it to the server explicitly (form field, cookie, request body, etc.).
For more on journey joining and what happens when the session ID does not match, see Joining the visitor’s journey.
Next steps