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 |
|
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 |
|
All |
The |
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 |
|---|---|---|
|
|
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: |
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 |
|---|---|---|
|
|
A country |
The assumed home country for a mobile user. |
|
|
A country |
The assumed home country for a tablet user. |
|
|
A country |
The assumed home country for a desktop user. |
|
|
An iso-region (following ISO 3166-2 standard) |
The assumed home iso-region for a mobile user. |
|
|
An iso-region (following ISO 3166-2 standard) |
The assumed home iso-region for a tablet user. |
|
|
An iso-region (following ISO 3166-2 standard) |
The assumed home iso-region for a desktop user. |
|
|
A city |
The assumed home city for a mobile user. |
|
|
A city |
The assumed home city for a tablet user. |
|
|
A city |
The assumed home city for a desktop user. |
|
|
A postal code |
The assumed home postal code of a desktop user. |
|
|
A postal code |
The assumed home postal code of a mobile user. |
|
|
A postal code |
The assumed home postal code of a tablet user. |
|
|
A country |
The assumed work country for a mobile user. |
|
|
A country |
The assumed work country for a tablet user. |
|
|
A country |
The assumed work country for a desktop user. |
|
|
An iso-region (following ISO 3166-2 standard) |
The assumed work iso-region for a mobile user. |
|
|
An iso-region (following ISO 3166-2 standard) |
The assumed work iso-region for a tablet user. |
|
|
An iso-region (following ISO 3166-2 standard) |
The assumed work iso-region for a desktop user. |
|
|
A city |
The assumed work city for a mobile user. |
|
|
A city |
The assumed work city for a tablet user. |
|
|
A city |
The assumed work city for a desktop user. |
|
|
A postal code |
The assumed work postal code of a desktop user. |
|
|
A postal code |
The assumed work postal code of a mobile user. |
|
|
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 |
|---|---|---|
|
|
|
Mobile users mobility score. |
|
|
|
Tablet users mobility score. |
|
|
|
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 |
|---|---|---|
|
|
|
The here . Example: age |
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
$ 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
}
}
]
}
]
}
$ 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
}
}
]
}
]
}
$ 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
}
}
]
}
]
}