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

/segment/overlap/filter

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

Returns the segments with the highest overlap with the provided filter

Request

The request object has the following fields:

Name

Type

Required

Description

siteGroupId

String

Yes

The site group to retrieve segments from.

namespace

String

Yes

Must be user (cookies) or page (urls).

count

Integer

No

Number of segments to return. Default 10.

start

Integer or String

No

The start time of the filter period specified according to

Traffic time specification

. Defaults to -31d for user namespace and -24h for page namespace.

stop

Integer or String

No

The stop time of the filter period specified according to

Traffic time specification

. Defaults to -0d (now).

filters

Array of Object

Yes

Traffic filters

to be applied. Conjunctive semantics (and) are assumed for the top-level filters.

Response

The response object for a successful query is of the following format:

Name

Type

Description

overlapResults

List of Object

Object of the form: {"segmentId: "abc123", "overlap": 0.50}

Examples

Bash
$ /config/bin/cx.py /segment/overlap/filter '{"siteGroupId":"1127234276582331313","namespace":"user","start":"-1h","stop":"-0h","filters":[{"type":"event","group":"host","item":"example.com"}]}'
{
 "overlapResults" : [ {
 "segmentId" : "1y2i8e8giy8if",
 "overlap" : 98.998998998999
 }, {
 "segmentId" : "1y2i8e8giy8ie",
 "overlap" : 85.08508508508508
 }, {
 "segmentId" : "1y2i8e8giy8ic",
 "overlap" : 73.17317317317318
 }, {
 "segmentId" : "1y2i8e8giy8id",
 "overlap" : 25.425425425425423
 }, {
 "segmentId" : "1y2i8e8giy8ig",
 "overlap" : 0.0
 } ]
}

Last updated: