Segment
Foreword
The parameter segment
describes the context of the segment. It is composed of different parameters:
Section | Description | Values |
---|---|---|
scope | The scope defines which kind of segmentation you will use. Find mode information in the help centre. | visit_id user_id visitor_id event_id |
segmentKey | In case your segment has been saved, you can directly use the key to refers to the segment. | String |
content | Description of the segment. | See below |
mode | Two modes are available to choose if you want to include or exclude the behaviour in your segment. | include or exclude |
period | In case of visitor or user segmentation, define the period on which the behaviour should have been made. | See here |
space | In case of visitor or user segmentation, define the space on which the behaviour should have been made. | See here |
Content | Description | Values |
---|---|---|
condition | The condition contains the filter you want to have in your segment. | Can only contain filter |
filter | The filter describes all the behaviour you want to follow. | See here |
Examples
Segment on the device type "Desktop"
{
// ...
"segment": {
"section": {
"scope": "visit_id",
"content": {
"condition": {
"filter": {
"device_type": {
"$eq": "Desktop"
}
}
}
},
"mode": "include"
}
}
// ...
}