Send a custom event
Record something the player never saw (a lead form, a quiz completion, an upsell) and land it on the viewer’s session.
A custom event is not a conversion. value is reported on its own and never feeds revenue, ROAS, EPC, or RPV. Send money through Record a conversion instead.
Requires a token with the events:write scope. The legacy tp_ workspace key is rejected here.
Server: https://e.trackplay.io
Authorizations
A scoped token minted in Settings → API tokens. Send it as Authorization: Bearer tplt_… or X-API-Key: tplt_….
Body
The event name, e.g. quiz_completed. Lowercased and reduced to [a-z0-9_-], then truncated to 64 characters. A workspace may use 100 distinct names, so keep the set small and fixed.
120"quiz_completed"
The viewer's session. This is the best identifier to send. Read it from the player with window.trackplay.getSessionId().
100Fallback if you have no session.
100Fallback if you have no session or device.
100Identity fallback. Hashed on arrival and never stored raw.
255Identity fallback. Your own customer ID, if you have already linked it.
120A number to report on this event. Not revenue. It never feeds revenue, ROAS, EPC, or RPV. Clamped to plus or minus 1,000,000,000.
Credit the event to a specific video. Wins over the session's last video.
100Your idempotency key. Send one. A retry with the same event_id collapses into the same row instead of double counting. Omit it and delivery is at-least-once, so duplicates are possible.
120Up to 20 extra key/value pairs. Keys are capped at 40 characters, values at 100. This is where varying data belongs. Never in the event name.
When the event happened. Defaults to arrival time.
Response
Recorded and attributed to a session.
The normalized event name that was stored.
Your event_id, or the one generated for you.
Whether the event landed on a viewer's session.
Which identifier resolved the viewer. null when nothing matched.
session_id, device_id, profile_id, identity, null 