Track a batch of events

Records multiple events in one request and returns a collector response for each, in order.

Request

This endpoint expects a list of objects.
event_idstringRequired

Unique event ID (ULID)

event_namestringRequired

Event name (page_view, order_completed, etc.)

event_timedoubleRequired

Event timestamp (Unix seconds)

anonymous_idstringRequired
Anonymous visitor ID
schema_version"1"OptionalDefaults to 1
Schema version
user_idstring or nullOptional
Known user ID after identify
traitsobject or nullOptional

User traits (email, phone, etc.)

contextobject or nullOptional
Event context.
consentobject or nullOptional
Google Consent Mode v2.
propertiesmap from strings to any or nullOptional
Event properties
test_modebooleanOptionalDefaults to false
Whether event is in test mode

Response

Successful Response
okbooleanDefaults to true
event_idstring or null
duplicatebooleanDefaults to false

Errors

422
Unprocessable Entity Error