v1.0.0
OpenAPI 3.1.0

Track a customer event

US region

Client Libraries

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_address
  • recipient
  • reply_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.

Path Parameters
  • identifier
    required

    The unique value representing a person. You may identify a person by id, email address, or the cio_id (when updating people), depending on your workspace settings. You can't reference a person by their phone number here; a phone number in the path is treated as an id. To identify people by phone number, use the Track v2 API.

    • Type: string · id

      The unique identifier you assigned to a person.

Body
application/json
    • name
      Type: string
      required

      The name of the event. This is how you'll reference the event in automations or segments.

    • data
      Type: object

      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).

    • id
      Type: string Format: ulid

      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.

    • timestamp
      Type: integer Format: unix timestamp

      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.

    • type
      enum
      const:  
      event

      Sets the event type. If your event isn't a page or screen type event, we automatically set this property to event.

      values
      • event
Responses
  • 200

    A successful request returns an empty object response.

  • application/json
  • 401

    Unauthorized request. Make sure that you provided the right credentials.

Request Example for post/api/v1/customers/{identifier}/events
{
  "name": "purchase",
  "data": {
    "price": 23.45,
    "product": "socks"
  }
}
No Body