Data Segmentation
Optionally, data may be segmented by 1 level. When using segmentation, events data is split based on the segment property requested. In order to select a segmentation property, specify any metadata property in the segmentBy field. The way segments are to be generated must be specified in the segments field. The segments field should contain a JSON array containing objects with the following properties:
Property |
Description |
type (string) |
The data type of the value. Can be string, stringArray, regex, number or numberRange based on whether the property is string-based or numeric. |
value (string/array/number) |
An exact string, an array of strings, a regular expression or a numeric value. This property should not be used if type is numberRange. Format is based on whether the property is string-based or numeric. |
min (number) |
Used only if the type is numberRange. Contains the minimum numeric value to include in this segment. May be combined with max. |
max (number) |
Used only if the type is numberRange. Contains the maximum numeric value to include in this segment. May be combined with min. |
split (boolean) |
Used only if the type is stringArray or regex. This specifies whether to split the returned data based on each different value matched by the regular expression or array (true), or to join all the clients that match the value as 1 table value or series (false). |
segmentLabel (string) |
Used only if split is false or if type is numberRange. This is required to give a name to a series when not splitting by value. It is important that the name given is unique. |
limit (integer) |
Optional property to set the limit on the maximum number of table values or series that should be produced by this set of values. To be used only if split is true. |
Information about Data Segmentation are presented in the following topics:
• | String-Based Segmentation Properties |
• | Numeric Segmentation Properties |
• | Boolean Segmentation Properties |
• | Special Segmentation Properties |
• | <NULL> Values for Data Segmentation |