Algebra Nodes
Algebra nodes are the way to mix different Audience Segments. For example, when you want to include users that belong to more than one segment at the time or if you want to exclude users of a specific segment.
Each Audience has one Algebra Node, and within it, you can mix your segments to build the audiences you want. Also, algebra nodes can be mixed together in a flexible way.
There are four types of nodes available, and they follow a JSON notation:
- Audience Segment nodes — Segments with no operator.
- AND nodes— To include the users that belong simultaneously to all the segments within it (like an intersection).
- OR nodes— To Include users that belong to any of the segments within it.
- NOT nodes— To not include the users that belong to the segments within it.
Let's see some examples:
Audience Segment node
// Target users that belong to a single Audience Segment
{
"audienceSegmentId": "920472839472539402"
}
AND node
Use it to include the users that belong simultaneously to all the segments within it (like an intersection).
// Target users that belong to three Audience Segments
"and": [
{ "audienceSegmentId": "920472839472539402" },
{ "audienceSegmentId": "233219483716673812" },
{ "audienceSegmentId": "333772819393817832" }
]
// Target users that belong to two groups of Audience Segments
"and": [
{
"or": [
{ "audienceSegmentId": "920472839472539402" },
{ "audienceSegmentId": "233219483716673812" }
]
},
{
"or": [
{ "audienceSegmentId": "826202615157899221" },
{ "audienceSegmentId": "100859273425167728" }
]
}
]
// Target users that belong to the first group of Audience Segments (42914 or 19234) but not on the last one (144219)
"and": [
{
"or": [
{ "audienceSegmentId": "281929273626192303" },
{ "audienceSegmentId": "625702934721171442" }
]
},
{
"not": { "audienceSegmentId": "194652937100327617" }
}
]
OR node
// Target users that belong to any of these Audience Segments
{
"or": [
{ "audienceSegmentId": "194652937100327617" },
{ "audienceSegmentId": "100859273425167728" },
{ "audienceSegmentId": "826202615157899221" }
]
}
NOT node
Use it to not include the users that belong to the segments within it.
// Target users that do not belong to the single Audience Segment
{
"not": { "audienceSegmentId": "194652937100327617" }
}
// Target users that do not belong to any of these Audience Segments
{
"not": {
"or": [
{ "audienceSegmentId": "920472839472539402" },
{ "audienceSegmentId": "826202615157899221" }
]
}
}
// Target users that do not belong to these Audience Segments
{
"not": {
"and": [
{ "audienceSegmentId": "920472839472539402" },
{ "audienceSegmentId": "826202615157899221" }
]
}
}
Updated 22 days ago