We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

Segment Composition

Segment Composition

A segment composition is a collection of segments combined via boolean operators (and, or, not).

When used for lookups, it combines the results of different segments to give a final result. For instance, if you combine a "Sports Lovers" user segment with a "Cooking articles" contextual segment with an "and" operator, the segment composition will only match when a sports lover user visits a cooking article. If they're combined using "or", only one of the two criteria has to be true.

Using it does not result in additional evaluation of segments as the results of the existing segment evaluation is simply combined using the boolean operators defined.

The composition object is defined as:

Composition

Can only provide one of and, or, not, or segmentId

Name

Type

Description

segmentId

String

Segment id

and

List of Node Objects

Combination of nodes that all must match for the Composition to match

or

List of Node Objects

Combination of nodes where 1 must match for the Composition to match

not

Node Object

Negates the matching of a node

Last updated: