This API produces aggregated top-lists of custom parameter values.
The user 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 24 hours or less |
All |
All |
All |
Any combination of fields and filters is supported. However, when the |
|
Last 31 days or less |
All |
All fields except |
All |
Any combination of fields except the |
|
More than 31 days ago without long term storage |
20 first groups and 100 first items in each group |
|
None |
The number of page views in the specified period can be retrieved. |
|
More than 31 days ago with long term storage |
All |
All fields except |
All |
Any combination of fields except the |
Request
Identical to /traffic/event.
Response
Identical to /traffic/event.
If groups are not specified, the number of aggregated groups will be limited to 20. /traffic/custom/describe can be used to list a larger number of available groups (up to 200).
Examples
$ python cx.py /traffic/custom '{"siteId":"12345", "groups":["subscriber"], "fields":["uniqueUsers","sessionStarts","sessionStops","sessionBounces"]}'
{
"start": 1416295741,
"stop": 1416299341,
"groups": [
{
"items": [
{
"item": "no",
"data": {
"sessionBounces": 187,
"sessionStops": 200,
"uniqueUsers": 491,
"events": 510,
"sessionStarts": 482
}
},
{
"item": "unknown",
"data": {
"sessionBounces": 151,
"sessionStops": 159,
"uniqueUsers": 375,
"events": 388,
"sessionStarts": 369
}
},
{
"item": "yes",
"data": {
"sessionBounces": 52,
"sessionStops": 52,
"uniqueUsers": 136,
"events": 136,
"sessionStarts": 129
}
}
],
"group": "subscriber"
}
]
}
$ python cx.py /traffic/custom '{"siteId":"12345", "groups":["subscriber"], "historyFields":["events"], "start":"-3w", "historyResolution":"week"}'
{
"start": 1414485344,
"stop": 1416299744,
"groups": [
{
"items": [
{
"item": "no",
"historyData": {
"events": [
56105,
54124,
53092
]
},
"data": {
"events": 163321
}
},
{
"item": "unknown",
"historyData": {
"events": [
41925,
41029,
40199
]
},
"data": {
"events": 123153
}
},
{
"item": "yes",
"historyData": {
"events": [
14113,
13576,
13387
]
},
"data": {
"events": 41076
}
}
],
"group": "subscriber"
}
],
"history": [
1414485344,
1415090144,
1415694944,
1416299744
]
}