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

/traffic/intent

This API aggregates short term intents generated from queries associated with the events for the given site and/or site group. It is also possible to specify traffic filters based on such intents.The short term intents wiki page describes how to annotate the events with intent information, either via (1) a query processing taxonomy, (2) a meta tag, or (3) a content processing taxonomy. The following documentation shows how to aggregate intents generated by the query processing taxonomy (1). To aggregate intents generated be the other two methods (2, 3) use /traffic/keyword with a <prefix>-intent group. Note that differently from user-keywords such as interests, these APIs count not all events from the users with the given intent, but the exact events (page veiws) triggering the intent. aggregates events with a query triggering the intent, while /traffic/keyword aggregates events with a** content **triggering the intent.

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 and itemsavailable

Fields available

Filters available

Notes

Last 31 days or less

All

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

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.

The intent groups are always prefixed.

Request

Identical to /traffic/event except that that the only fields that can be aggregated are events and uniqueUsers, where events is an implicit field and the uniqueUsers field has to be specified explicitly. See the first example below.

Response

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

The events count returned by this API tells how many times an events has been triggered within the given constrains (site, time, etc.), but not the total number of events from the users having a such intent. For the latter purpose use the /traffic API with an intent filter within a userExplode filter. See the second example below.

Examples

Bash
$ python cx.py /traffic/intent '{"siteId":"12345", "start":"-1d", "fields":["uniqueUsers"], "groups":["cxd-intent"]}'
{
 "start": 1400593581,
 "stop": 1400679981,
 "groups": [
 {
 "group": "cxd-intent",
 "items": [
 {
 "data": {
 "events": 155,
 "uniqueUsers": 10,
 },
 "item": "travel"
 },
 {
 "data": {
 "events": 155,
 "uniqueUsers": 10,
 },
 "item": "travel/uk"
 },
 {
 "data": {
 "events": 155,
 "uniqueUsers": 10,
 },
 "item": "travel/uk/london"
 }
 ]
 }
 ]
}

Last updated: