Split automatically captures whenever an impression occurs for a split feature flag. Learn more about impression events.
To power analytics and experimentation, you need to send a broader set of events to Split. To send Split additional event data, use the Split
track call to record any actions that your customers perform or send other customer experience events from other sources. With the
track call, you can measure customer behavior in your application by sending events such as clicks, views, checkout events, pageload time, or any event that measures your customer experience.
Events can then be aggregated to produce metrics. Learn more about creating a metric in Split.
track method to record any actions your customers perform. Each action is known as an
event and corresponds to an
event type. Calling
track through one of our SDKs or via the API is the first step to getting experimentation data into Split and allows you to measure the impact of your splits on your users’ actions and metrics.
In the example below, you can see that the
.track() method can take up to four arguments. The proper data type and syntax for each are:
- CUSTOMER_ID: The
customer_idvariable used in the
getTreatmentcall and firing this track event. The expected data type is String.
- TRAFFIC_TYPE: The traffic type of the customer ID in the track call. The expected data type is String. You can only pass values that match the names of traffic types that you have defined in your instance of Split.
- EVENT_TYPE: The event type that this event should correspond to. The expected data type is String. Full requirements on this argument are:
- Contains 63 characters or fewer.
- 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:
- VALUE: (Optional) The value to be used in creating the metric. This field can be sent in as null or 0 if you intend to purely use the count function when creating a metric. The expected data type is Integer or Float.
Here is an example
client.track("CUSTOMER_ID", "TRAFFIC_TYPE", "EVENT_TYPE", VALUE) // Example client.track("email@example.com", "user", "page_load_time", 83.334)
Visualize in Split
Track events are listed on the Event Types tab in Admin Settings. New event types and corresponding events are shown here as they are received by Split.
You can update an event type's name and description via the API.
Click View to the right of an event type to see all of the corresponding events. On the Initial Web Load Time screen you can investigate the event payload to that ensure the data is being received properly.