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

/traffic/keyword

This API produces aggregated top-lists of keywords found in the content profiles of the viewed pages, also known as "attention map". For each top-list item, the only fields that can be aggregated by this API are weight, events and (in most cases) urls. The other fields, however, can be aggregated by combining /traffic request with a filter based on the particular item.

The user 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 24 hours or less

All

weight, events, urls

All

Any combination of fields and filters is supported. However, when the urls field is used, the explodeUsers filter and uniqueUsers field can be used only for a single site, i.e., when the number of sites is 1.

Last 31 days or less

All

weight, events

All

Any combination of fields except the urls field. Any combination of filters.

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

All

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

Request

Identical to /traffic/event except that the only fields that can be aggregated are weight (also known as attention score), events and urls, where both weight and events are implicit and the urls 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/keyword '{"siteId":"12345", "groups":["person"], "fields":["urls"], "count":3}'
{
 "start": 1416304027,
 "stop": 1416307627,
 "groups": [
 {
 "data": {
 "weight": 279.79688,
 "events": 197,
 "urls": 42
 },
 "group": "person",
 "items": [
 {
 "item": "robin williams",
 "data": {
 "weight": 36.23047,
 "events": 38,
 "urls": 8
 }
 },
 {
 "item": "lauren bacall",
 "data": {
 "weight": 16.347656,
 "events": 18,
 "urls": 4
 }
 },
 {
 "item": "jordan strauss",
 "data": {
 "weight": 11.234375,
 "events": 12,
 "urls": 2
 }
 }
 ]
 }
 ]
}
Bash
$ python cx.py /traffic/keyword '{"siteId":"12345", "groups":["pageclass"], "historyFields":["events"], "start":"-5m", "historyResolution":"minute"}'
{
 "start": 1416307505,
 "stop": 1416307805,
 "groups": [
 {
 "data": {
 "events": 48,
 "weight": 48.0
 },
 "historyData": {
 "events": [
 8,
 12,
 10,
 10,
 8
 ]
 },
 "group": "pageclass",
 "items": [
 {
 "item": "article",
 "historyData": {
 "events": [
 8,
 12,
 10,
 10,
 8
 ]
 },
 "data": {
 "events": 48,
 "weight": 48.0
 }
 }
 ]
 }
 ],
 "history": [
 1416307505,
 1416307565,
 1416307625,
 1416307685,
 1416307745,
 1416307805
 ]
}

Last updated: