Events Overview

This API allows you to send events programmatically to Split. Record events that measure your customer behavior across your application including clicks, views, checkout events, page load times, or any event that measures your customer experience.

Metrics can then be calculated from these events to measure the results of experiments rolled out as Splits. Learn more about Creating a Metric in Split.

In the examples below you'll see that the payload can take up to six arguments. The proper data type and syntax for each are:

  • key: Represents the customer_id used in your getTreatment call and firing this track event.
    • Expected Data Type: String
  • trafficTypeName: Represents the traffic type of the customer id in the track call.
    • Expected Data Type: String
    • You can only pass values that match the names of Traffic Types that you have defined in your instance of Split.
  • eventTypeId: Represents the event type that this event should correspond to.
    • Expected Data Type: String
    • Full requirements on this argument are:
      • 80 characters or less
      • Starts with a letter or number
      • Contains only letters, numbers, hyphen, underscore, or period.
      • This is the regular expression we use to validate the value: [a-zA-Z0-9][-_\.a-zA-Z0-9]{0,62}
  • value: (optional) Represents the value to be used in creating the metric. This field can be sent in as null or 0 if you intend to purely utilize the count function when creating a metric.
    • Expected Data Type: Long or Float
  • environmentName: Represents the environment in Split you want this event to be mapped to.
    • Expected Data Type: String
    • You can only pass values that match the names of Environments that you have defined in your instance of Split.
  • timestamp: (optional) Represents the time in milliseconds since epoch that the event occurred.
    • Expected Data Type: Long
  • properties: (optional) A dictionary of key value pairs that can be used to filter your metrics. Learn more about event property capture here. Split currently supports three types of properties: strings, numbers, and booleans.
    • Expected Data Type: map from string to integer, float, string, or boolean