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

/traffic/user/keyword

This API aggregates various types of annotated information associated with the visitors and consumers of a site and/or site group. The various types of annotated user data, with their respective keyword groups, will be listed and explained below. API queries for the various data types will be exemplified at the end of this page. Note that this API does not consider external user identities available to the caller.

For using the API, you must be authenticated and have read permissions to the given sites.

Current aggregation period and filter restrictions are as follows:

Period

Groups available

Fields available

Filters available

Notes

Last 31 days or less

All

weight, events, uniqueUsers

All

More than 31 days ago without

long term storage

None

None

None

The data is unavailable for periods over 31 days, unless the sites are configured with long term support.

More than 31 days ago with

long term storage

All

weight, events, uniqueUsers

All

The explodeUsers filter and uniqueUsers field can be used only for a single site, i.e., when the number of sites is 1.

User Interest

User Interest data can be retrieved with this API similarly to how it can be retrieved with /traffic/user/interest. User Interests are further documented in the User Profiles documentation, and requires that a user interest taxonomy has been deployed.

The User Interest data is always prefixed.

Group

Item

Description

<prefix>-categories

A user interest node.

The User Interest keyword describes a user interest node, according to the user interest taxonomy which is deployed with this prefix. Example: entertainment/music/pop

Home and work locations

A user's expected home and work location is regularly estimated and added to the user profile. This is further described in the User Profiles documentation. Aggregated user data regarding home/work locations can be retrieved by querying for the following keyword groups:

Group

Item

Description

user-home-country-mobile

A country

The assumed home country for a mobile user.

user-home-country-tablet

A country

The assumed home country for a tablet user.

user-home-country-desktop

A country

The assumed home country for a desktop user.

user-home-isoregion-mobile

An iso-region (following ISO 3166-2 standard)

The assumed home iso-region for a mobile user.

user-home-isoregion-tablet

An iso-region (following ISO 3166-2 standard)

The assumed home iso-region for a tablet user.

user-home-isoregion-desktop

An iso-region (following ISO 3166-2 standard)

The assumed home iso-region for a desktop user.

user-home-city-mobile

A city

The assumed home city for a mobile user.

user-home-city-tablet

A city

The assumed home city for a tablet user.

user-home-city-desktop

A city

The assumed home city for a desktop user.

user-home-postal-code-desktop

A postal code

The assumed home postal code of a desktop user.

user-home-postal-code-mobile

A postal code

The assumed home postal code of a mobile user.

user-home-postal-code-tablet

A postal code

The assumed home postal code of a tablet user.

user-work-country-mobile

A country

The assumed work country for a mobile user.

user-work-country-tablet

A country

The assumed work country for a tablet user.

user-work-country-desktop

A country

The assumed work country for a desktop user.

user-work-isoregion-mobile

An iso-region (following ISO 3166-2 standard)

The assumed work iso-region for a mobile user.

user-work-isoregion-tablet

An iso-region (following ISO 3166-2 standard)

The assumed work iso-region for a tablet user.

user-work-isoregion-desktop

An iso-region (following ISO 3166-2 standard)

The assumed work iso-region for a desktop user.

user-work-city-mobile

A city

The assumed work city for a mobile user.

user-work-city-tablet

A city

The assumed work city for a tablet user.

user-work-city-desktop

A city

The assumed work city for a desktop user.

user-work-postal-code-desktop

A postal code

The assumed work postal code of a desktop user.

user-work-postal-code-mobile

A postal code

The assumed work postal code of a mobile user.

user-work-postal-code-tablet

A postal code

The assumed work postal code of a tablet user.

Distinguishing between devices (mobile, tablet, desktop) allows for more precise aggregation of relevant data.

User Mobility

A user's travelling patterns is analysed based on the number of locations on which the user is registered. This is further described in the User Profiles documentation. Aggregated user data regarding users traveling pattern can be retrieved by querying for the following keyword groups:

Group

Item

Description

user-mobility-mobile

locale/regional/international

Mobile users mobility score.

user-mobility-tablet

locale/regional/international

Tablet users mobility score.

user-mobility-desktop

locale/regional/international

Desktop users mobility score.

While aggregated scores may give an indication as tp how frequent the users of a site/site group are travelling, the User Mobility keywords are first and foremost designed for individual user profiles.

Audience Estimation

Audience estimation can be configured through deployment of specific audience meta tags on a web site. This is further described in the Audience Estimation documentation. Aggregation of audience data enables you extract exact statistics for a set or sub-set from your site or site group, being the proportion of assumed teenagers, opera lovers or any other segment you have defined though the audience meta tags. The audience estimation tags are always prefixed.

Group

Item

Description

<prefix>-audience

type/value

The type refers to the audience group, with a corresponding value. The type and value is specified when audience estimation meta tags are deployed, as described

here

. Example: age/25-40

The audience estimation data is always prefixed.

Request

Identical to /traffic/event except that history aggregation (historyFields) is not supported and that the only fields that can be aggregated are weight, events and uniqueUsers, where both weight and events are implicit and the uniqueUsers field has to be specified explicitly. See also example below.

Response

Identical to /traffic/event except that each group also has an aggregated summary. See also example below.

Examples

Bash
$ python cx.py /traffic/user/interest '{"siteId":"12345", "start":"-7d", "groups":["cxd-categories"], "fields":["uniqueUsers"]}'
{
 "start": 1415796187,
 "stop": 1416400987,
 "groups": [
 {
 "data": {
 "uniqueUsers": 527,
 "events": 7516,
 "weight": 7516.0
 },
 "group": "cxd-categories",
 "items": [
 {
 "item": "news",
 "data": {
 "uniqueUsers": 527,
 "events": 7516,
 "weight": 2128.711
 }
 },
 {
 "item": "careers",
 "data": {
 "uniqueUsers": 526,
 "events": 7514,
 "weight": 1629.8281
 }
 },
 {
 "item": "sport",
 "data": {
 "uniqueUsers": 522,
 "events": 7502,
 "weight": 1376.2344
 }
 },
 {
 "item": "careers/jobs",
 "data": {
 "uniqueUsers": 525,
 "events": 7511,
 "weight": 1121.7109
 }
 },
 {
 "item": "news/business news",
 "data": {
 "uniqueUsers": 525,
 "events": 7511,
 "weight": 1094.207
 }
 },
 {
 "item": "sport/basketball",
 "data": {
 "uniqueUsers": 517,
 "events": 7468,
 "weight": 561.8203
 }
 },
 {
 "item": "entertainment",
 "data": {
 "uniqueUsers": 515,
 "events": 7430,
 "weight": 509.21875
 }
 },
 {
 "item": "travel",
 "data": {
 "uniqueUsers": 521,
 "events": 7476,
 "weight": 481.80078
 }
 },
 {
 "item": "news/international",
 "data": {
 "uniqueUsers": 522,
 "events": 7498,
 "weight": 349.28125
 }
 },
 {
 "item": "government",
 "data": {
 "uniqueUsers": 517,
 "events": 7445,
 "weight": 335.8164
 }
 }
 ]
 }
 ]
}
Bash
$ python cx.py /traffic/user/keyword '{"siteId":"12345", "start":"-1d", "groups":["user-home-city-desktop","user-work-city-desktop"], "fields":["uniqueUsers"]}'
{
 "start": 1416315521,
 "stop": 1416401921,
 "groups": [
 {
 "data": {
 "uniqueUsers": 393,
 "events": 766,
 "weight": 766.0
 },
 "group": "user-work-city-desktop",
 "items": [
 {
 "item": "oslo",
 "data": {
 "uniqueUsers": 40,
 "events": 88,
 "weight": 88.0
 }
 },
 {
 "item": "london",
 "data": {
 "uniqueUsers": 31,
 "events": 48,
 "weight": 48.0
 }
 },
 {
 "item": "dublin",
 "data": {
 "uniqueUsers": 18,
 "events": 45,
 "weight": 45.0
 }
 },
 {
 "item": "zurich",
 "data": {
 "uniqueUsers": 23,
 "events": 44,
 "weight": 44.0
 }
 },
 {
 "item": "petropolis",
 "data": {
 "uniqueUsers": 20,
 "events": 40,
 "weight": 40.0
 }
 },
 {
 "item": "rio de janeiro",
 "data": {
 "uniqueUsers": 16,
 "events": 32,
 "weight": 32.0
 }
 },
 {
 "item": "stockholm",
 "data": {
 "uniqueUsers": 16,
 "events": 30,
 "weight": 30.0
 }
 },
 {
 "item": "bilbao",
 "data": {
 "uniqueUsers": 14,
 "events": 29,
 "weight": 29.0
 }
 },
 {
 "item": "cape town",
 "data": {
 "uniqueUsers": 11,
 "events": 28,
 "weight": 28.0
 }
 },
 {
 "item": "madrid",
 "data": {
 "uniqueUsers": 11,
 "events": 25,
 "weight": 25.0
 }
 }
 ]
 },
 {
 "data": {
 "uniqueUsers": 391,
 "events": 757,
 "weight": 757.0
 },
 "group": "user-home-city-desktop",
 "items": [
 {
 "item": "wuhan",
 "data": {
 "uniqueUsers": 48,
 "events": 88,
 "weight": 88.0
 }
 },
 {
 "item": "guangzhou",
 "data": {
 "uniqueUsers": 19,
 "events": 50,
 "weight": 50.0
 }
 },
 {
 "item": "canberra",
 "data": {
 "uniqueUsers": 21,
 "events": 38,
 "weight": 38.0
 }
 },
 {
 "item": "london",
 "data": {
 "uniqueUsers": 21,
 "events": 37,
 "weight": 37.0
 }
 },
 {
 "item": "melbourne",
 "data": {
 "uniqueUsers": 15,
 "events": 34,
 "weight": 34.0
 }
 },
 {
 "item": "perth",
 "data": {
 "uniqueUsers": 18,
 "events": 34,
 "weight": 34.0
 }
 },
 {
 "item": "singapore",
 "data": {
 "uniqueUsers": 17,
 "events": 31,
 "weight": 31.0
 }
 },
 {
 "item": "sydney",
 "data": {
 "uniqueUsers": 13,
 "events": 25,
 "weight": 25.0
 }
 },
 {
 "item": "bangkok",
 "data": {
 "uniqueUsers": 12,
 "events": 23,
 "weight": 23.0
 }
 },
 {
 "item": "makati",
 "data": {
 "uniqueUsers": 14,
 "events": 23,
 "weight": 23.0
 }
 }
 ]
 }
 ]
}
Bash
$ python cx.py /traffic/user/keyword '{"siteId":"12345", "start":"-1d", "groups":["cxd-audience"], "fields":["uniqueUsers"]}'
{
 "start": 1400741786,
 "stop": 1400745386,
 "groups": [
 {
 "group": "cxs-audience",
 "data": {
 "events": 1000,
 "uniqueUsers": 650,
 "weight": 760.0
 },
 "items": [
 {
 "item": "age/30-40",
 "data": {
 "events": 600,
 "uniqueUsers": 400,
 "weight": 360.0
 }
 },
		{
 "item": "age/20-30",
 "data": {
 "events": 400,
 "uniqueUsers": 250,
 "weight": 256.0
 }
 },
 {
 "item": "gender/male",
 "data": {
 "events": 350,
 "uniqueUsers": 300,
 "weight": 192.0
 }
 },
		{	
 "item": "gender/female",
 "data": {
 "events": 650,
 "uniqueUsers": 450,
 "weight": 364.0
 }
 }
 ]
 }
 ]
}

Last updated: