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

/segment/overlap

The user must be authenticated and have read permissions to the siteGroup.

Request

The request object has the following fields:

Name

Type

Required

Description

siteGroupId

String

No

The site group to retrieve segments from.

limit

Integer

No

Limit number of segments.

segments

Array of String

No

Segments to include. All segments from the site group will be included if this is omitted.

allLevels

Boolean

No

If true, will calculate overlap of all combinations of segments. Maximum of 10 segments can be included when true

segmentNamespace

String

No

Either page (urls) or user(cookies). Will default to user.

Response

The response object for a successful query has the following fields:

Name

Type

Description

segments

Array of String

Segments that were included in the segment overlap calculation.

levels

Array of Level Object

See level object below.

totalUnion

Integer

Total number of members in all the included segments.

Level object:

Name

Type

Description

size

Integer

The number of segments used in the overlap calculation. Size 1 means overlap with itself, i.e. size of the segment.

overlap

Array of Overlap Object

See overlap object below.

Overlap object:

Name

Type

Description

indexes

Array of Integer

The index of the segment(s) included in the overlap claculation.

intersection

Integer

Number of members that are part of all the segments listed in indexes.

Examples

Bash
$ /config/bin/cx.py /segment/overlap '{"siteGroupId":"1127234276582331313","segments":["8q6sq96cyy5y","a9yd48gemajp","8m64z0cjy6q5"], "allLevels": true}'
{
 "segments": [
 "8q6sq96cyy5y",
 "a9yd48gemajp",
 "8m64z0cjy6q5"
 ],
 "levels": [
 {
 "size": 1,
 "overlap": [
 {
 "indexes": [
 0
 ],
 "intersection": 1028142
 },
 {
 "indexes": [
 1
 ],
 "intersection": 0
 },
 {
 "indexes": [
 2
 ],
 "intersection": 7
 }
 ]
 },
 {
 "size": 2,
 "overlap": [
 {
 "indexes": [
 0,
 1
 ],
 "intersection": 0
 },
 {
 "indexes": [
 0,
 2
 ],
 "intersection": 7
 },
 {
 "indexes": [
 1,
 2
 ],
 "intersection": 0
 }
 ]
 },
 {
 "size": 3,
 "overlap": [
 {
 "indexes": [
 0,
 1,
 2
 ],
 "intersection": 0
 }
 ]
 }
 ],
 "totalUnion": 1028142
}

Last updated: