Skip to main content
POST
Track experiment events

Authorizations

X-Write-Key
string
header
required

Write key for client-side experiment event tracking. Safe to expose in browser code.

Body

event
enum<string>
required

Event type

Available options:
impression,
view,
click,
conversion
experiment
string
required

Experiment slug

Maximum string length: 60
Example:

"homepage-hero-test"

variantId
string

Variant that triggered the event

Example:

"variant-a"

channel
enum<string>

Traffic channel

Available options:
web,
email,
ad,
in-app,
social,
other
device
enum<string>
Available options:
mobile,
desktop,
tablet
referrer
string
metadata
object

Custom metadata (max 10KB, max depth 3)

source
enum<string>
default:api
Available options:
sdk,
api
writeKey
string

Alternative to X-Write-Key header

Response

Events processed

ok
boolean
Example:

true

processed
integer
Example:

1

errors
object[]
warning
string

Returns 'write_key_recommended' if no write key was provided