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

Content settings conditions

A condition that must be satisfied for using some content (sub)settings. A condition is an object with a field type as well as other fields that vary with the type. The following fields are common to all condition types:

Name

Type

Description

paused

boolean

If true, the condition is considered paused and will always fail to be satisfied. Default is false.

The condition types are as follows:

"time"

Satisfied if all of listed conditions are true:

  • Time of day¹ is between from (inclusive) and to (exclusive)

  • Current date¹ is between fromDate (inclusive) and toDate (exclusive)

  • Current day¹ of the week is in days

Name

Type

Description

from

String

A time of day¹, between "00:00" and "23:59". null means "00:00".

to

String

A time of day¹, between "00:00" and "23:59". null means "00:00" the next day.

fromDate

String

A date¹ with optional time¹. null means open ended from date.

toDate

String

A date¹ with optional time¹. null means open ended to date.

days

Array of Integer

A set of integers between 1 (Monday¹) and 7 (Sunday¹). null means any day.

¹ Using the time zone of the widget site. fromDate and toDate can also be specified as a full ISO 8601 date time with explicit time zone.

"condition":{"type":"time", "from":"09:00", "to":"16:00", "fromDate":"2017-10-29T00:00:00+01:00", "toDate":"2017-11-07T10:00:00", "days":[1,2,3,4,5]}

###Examples

Given date 2017-10-25 If 'fromDate' is 2017-10-25 and 'toDate' is 2017-10-26 we will have a match (inclusive 'fromDate'). If 'fromDate' is 2017-10-24 and 'toDate' is 2017-10-25 we will not have a match (exclusive 'toDate').

"user"

Satisfied if the user profile of the current user contains a certain item. See "device" and "location" conditions for conditions based on the current device or location. Fields:

Name

Type

Description

group

String

A user profile group.

item

String

An item that must be found in the in the user profile group of the current user.

items

Array of String

An array of items, at least one that must be found in the user profile group of the current user.

itemRange

A range object

A range of values that at least one item must be within.

threshold

Integer

A number between 0 and 100 (inclusive). If specified, the weight of the item must be greater than or equal to this value / 100.

topItem

Boolean

If true, match only this item if it is the item with the largest weight in the group (for this user).

fallback

Boolean

If true, condition is satisfied when looking up user profile fails due to timeout or other technical reasons.

source

String

If external, only consider the external user profile groups. If keyword, only consider the content profile groups of the pages the user has consumed. If interest, only consider inferred user interests. If custom, only consider custom parameters, also known as retargeting parameters. Default is all.

Exactly one of item, items and itemRange must be provided.

"condition":{"type":"user", "group":"user-region", "item":"california", "threshold":25, "topItem": true}

Range object

Name

Type

Description

type

String

Either time or number.

from

String or number

Item must be greater than or equal to this lower bound

to

String or number

Item must be less than this lower bound

At least one of from and to must be specified. Items in the user profiles is assumed to be formatted accordingly.

For type time, items must be ISO8601 formatted timestamps, and from and to must be either ISO8601 formatted timestamps or time offsets such as "-1w" or "5h". Possible units are seconds,minutes,hours,days,weeks,Months,years. For type number, both items, from and to must be integers or reals like 1.0.

"content"

Satisfied if the content profile of the page hosting the widget (i.e. context url) contains a certain item. Fields:

Name

Type

Description

group

String

A content profile group name. Both internal and customer-prefixed group names are allowed.

item

String

An item that must be found in the in the content profile group.

items

Array of String

An array of items, at least one which must be found in the content profile group.

itemRange

A range object

A range of values that at least one item must be within.

threshold

Integer

A number between 0 and 100 (inclusive). If specified, the weight of the item must be greater of equal to this value / 100.

topItem

Boolean

If true, match only this item if it is the item with the largest weight in the group (for this content profile).

fallback

Boolean

If true, condition is satisfied when looking up user profile fails due to timeout or other technical reasons.

Exactly one of item, items and itemRange must be provided.

"condition":{"type":"content", "group":"location", "item":"new york"}

"userSegment" (requires Cxense DMP)

Satisfied if the current user belongs to the given segment.

Name

Type

Description

segmentId

String

An identifier of a user segment in the same site group as this content configuration object.

segmentType

String

A type of a user segment in the same site group as this content configuration object. One of 'traffic', 'external' or 'lookalike'.

"condition":{"type":"userSegment", "segmentId":"87f71b483e4255ccbee08da1ed90bedf52c74071", "segmentType":"traffic"}

"context"

Satisfied if the current page (where the widget is found) has certain properties. Fields:

Name

Type

Description

pageclass

String

Either "article" or "frontpage". (null means any page class.)

sentiment

String

Either "negative" or null (any sentiment).

recommending

Boolean

false: Matches documents with recs-recommending = false.true: Matches all other documents.null: Matches any document.

categoryType

String

The type of the categories matched. null means "taxonomy".

categories

Array of String

If not null, the current page must belong to one of these categories.

urls

Array of String

If not null, the current url must be equivalent to one of these urls.

hosts

Array of String

If not null, the host name of the current url must be equivalent to one of the given host names. Host names are normalized to determine equality.

"condition":{"type":"context", "pageclass":"frontpage", "categoryType":"taxonomy", "categories":["sport/football"]}

Best practice available: [Using "context" as a dynamic parameter for content-configurations](page://Using "context" as a dynamic parameter for content-configurations)

"referrer"

Satisfied if the http referrer host belongs to one of the given classes. Fields:

Name

Type

Description

urls

Array of String

Referrer is equal to one of the given URLs. URLs are normalized to determine equality.

hosts

Array of String

Referrer host name is one of the given hosts. Host names are normalized to determine equality.

queries

Array of String

Referrer is recognized as a search engine, and the search query is one of the given queries.

hostClasses

Array of String

Referrer host belongs to one of the given classes. The classification is based on the referrer top-level domain name. Possible values are direct (no referrer), search (a known search engine), social (a known social network), internal (from the same top-level domain) or other (external pages, cross-domain referrals).

searchEngines

Array of String

Referrer is recognized as one of the given search engines, for AOL, Ask, Bing, DuckDuckGo, Google, Yandex, Yahoo, Baidu or qkankan.

socialNetworks

Array of String

Referrer is recognized as one of the given social networks, for Facebook, Google+, LinkedIn, Mixi, Myspace, Pinterest, Tumblr, Twitter, Instagram, WeChat, Sina Weibo, YouTube, Quora, Reddit, or WhatsApp. (Note that we rely on the Referrer attribute set. Some networks, like WhatsApp will conceal themselves and supply no Referrer.)

"condition":{"type":"referrer", "hostClasses":["search", "internal"], "socialNetworks":["LinkedIn"]}

This is satisfied if the referrer is either

  • a search engine, or

  • a page in the same domain as the current url, or

  • the social network LinkedIn.

"location"

Satisfied if the location of the user (as determined by the user's IP address) has one of the given properties. Fields:

Name

Type

Description

countries

Array of String

The location is for one of the given countries, specified as lowercase two-letter country code (ISO-3166-1 alpha-2). Examples: "us", "no".

regions

Array of String

The location is for one of the given geographical regions.

cities

Array of String

The location is for one of the given cities.

companies

Array of String

The location is for one of the given companies.

metrocodes

Array of String

The location is for one of the given metrocodes. Examples: "itv london".

postalCodes

Array of String

The location is for one of the given postal codes. Examples: "M6J 2R7", "0268", "10023".

isoRegions

Array of String

The location is for one of the given iso regions. Examples: "uk-swk".

"condition":{"type": "location", "countries": ["us", "no"]}

"device"

Satisfied if the device of the user (as determined by the user agent http header) has one of the given properties. Fields:

Name

Type

Description

deviceTypes

Array of String

The type of device is of one of the given types.

browserOss

Array of String

The device is running one of the given operating systems.

browsers

Array of String

The device is running one of the given browsers.

browserVersions

Array of String

The device is running one of the given browser versions.

mobileBrands

Array of String

The device is of one of the given mobile brands.

"condition":{"type": "device", "browserOss": ["iPhone OS"]}

"and"

Satisfied if all the sub-conditions are satisfied. Fields:

Name

Type

Description

conditions

Array of Object

Conditions that must all be satisfied.

Example:

"condition":{"type":"and", "conditions":[{"type":"user", ...}, {"type":"context", ...}]}

"or"

Satisfied if at least one of the sub-conditions are satisfied. Fields:

Name

Type

Description

conditions

Array of Object

Conditions where at least one must be satisfied.

"condition":{"type":"or", "conditions":[{"type":"user", ...}, {"type":"context", ...}]}

"not"

Satisfied if the sub-condition is not satisfied. Fields:

Name

Type

Description

condition

Object

Condition that must not be satisfied.

"condition":{"type":"not", "condition":{"type":"context", ...}}

"impressionCapping"

The impressionCapping condition is used for limiting the number of times a branch with the given tag will return results. The impression capping is based on impressions logged on the tag for given widget configuration. One impression is logged per item returned in the result. Users will be exposed to results up to and including the count (number of impressions) during a period. Impressions from backfill items will not be counted. The condition will read impressions tracked from branches with the same leaf tag as the impression capping tag on the same widget configuration. Fields:

Name

Type

Description

count

int

Bigger than 0.

period

int

Deprecated A number in seconds between 0 and 2678400 (inclusive). Where 2678400 equals 31 days

period

String

A period that is max 31 days.

tag

String

Acts as a label for the impression capping. This must only contain lowercase ascii letters (a-z) or digits (0-9). Maximum length is 10.

scope

String

Default is user, where impressions only for the current user is counted. If global, count impressions across all users. Note that global counting is subject to caching, which could cause the number of delivered impressions to exceed the count.

eventType

String

Default is impression. If click, count clicks instead of impressions.

"condition":{"type":"impressionCapping","count":"12", "period":"12h", "tag":"subscribe"}

"event"

The event condition can be used to find pageviews for a given user. This can be used to do branching based on loyalty and on time since the last visit on the page. min=1 during a period means that the user has at least one pageview in that period, which means the user has visited the site. Many pageviews during a period might also suggest a better profile on the user.

Name

Type

Description

min

Integer

0 or greater. The minimum number of pageview events for this condition to be true.

max

Integer

0 or greater. The maximum number of pageview events for this condition to be true.

period

int

Deprecated A number in seconds between 0 and 2592000 (inclusive). Where 2592000 equals 30 days

period

String

A period that is max 30 days.

"condition":{"type":"event","min":"5", "max":"7", "period":"8d"}

"userEngagement"

The userEngagement condition can be used to target the audience based on the number of days they have visited the siteGroup during the provided period. max=0 during a period means that the user has not yet visited the site before the condition is checked so that allows to target the first time visitors.

Name

Type

Description

min

Integer

0 or greater. The minimum number of visit days for this condition to be true.

max

Integer

0 or greater. The maximum number of visit days for this condition to be true.

period

String

A period that is max 30 days.

"condition":{"type":"userEngagement","min":"5", "max":"7", "period":"8d"}

Last updated: