Track a customer event
Send an event associated with a person, referenced by the identifier in the path. There are three defined event type values: page, screen and event. Page and screen events represent website page views and mobile app screen views respectively; the name for these event types is intended to be the page or screen a person visited or viewed. Any other event, is given the event type.
We automatically trim leading and trailing spaces from event names.
Reserved Properties
There are a few important values which, if sent with the events that trigger automations, will override your automation settings:
from_addressrecipientreply_to
When using the Javascript snippet to track events, you must call the Behavioral Tracking API call after identifying the customer or the event will not associate with the customer’s profile.
- identifierrequired
The unique value representing a person. You may identify a person by
id,emailaddress, or thecio_id(when updating people), depending on your workspace settings. You can't reference a person by theirphonenumber here; a phone number in the path is treated as anid. To identify people by phone number, use the Track v2 API.- Type: string · id
The unique identifier you assigned to a person.
- Type: stringnamerequired
The name of the event. This is how you'll reference the event in automations or segments.
- Type: objectdata
Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by
customer_id). - Type: string Format: ulidid
A ULID we use to deduplicate events. If an event repeats a value we've already received, we ignore the duplicate. Our Python and Ruby libraries don't pass this ID.
- Type: integer Format: unix timestamptimestamp
The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event.
NOTE: Events with a timestamp in the past 72 hours can trigger automations.
- enumtypeconst:event
Sets the event type. If your event isn't a
pageorscreentype event, we automatically set this property toevent.values- event
- 200
A successful request returns an empty object response.
- application/json
- 401
Unauthorized request. Make sure that you provided the right credentials.
{
"name": "purchase",
"data": {
"price": 23.45,
"product": "socks"
}
}
A successful request returns an empty object response.