Level Segments Format

Segments are defined as JSON objects. A single JSON object may create a single item on a table (or a single series on a timeline chart), or it may create a number of items/series if splitting is enabled. Each object should contain the following:

type (string)—The data type of the value. Can be string, stringArray, regex, number or numberRange based on whether the property is string-based (String-Based Filters) or numeric (Numeric Filters).
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 (String-Based Filters) or numeric (Numeric Filters).
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.