Retrieves Cxense Content reports.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
One of |
|
|
String |
No |
The widget ID. Not available for |
|
|
Number or String |
Yes |
Specified according to Traffic time specification . |
|
|
Number or String |
Yes |
Specified according to Traffic time specification . |
|
|
Array of String |
No |
The metrics to aggregate |
|
|
Array of String |
No |
The metrics to aggregate a |
|
|
Integer |
No |
The desired number of "buckets" to divide the interval into. At most 7*24. |
|
|
String |
No |
The size of the "buckets". Possible values: |
|
|
Boolean |
No |
Whether to use UTC when rounding to the nearest day/week/month. |
|
|
String |
No |
Which time zone to use when rounding to the nearest day/week/month. Specified as name in the TZ database. |
|
|
String |
No |
Count only impressions, clicks or conversions originating from the given site. |
|
|
String |
No |
Count only impressions and clicks towards the given target site. |
At least one of siteId and widgetId must be provided. If widgetId is provided, the user must have read access to the site group id of the widget. If only siteId is provided, the user must have read access to the provided site id. Exactly one of historyBuckets and resolution must be provided. Only one of useUtc and timeZone can be specified. If none of them are specified, the time zone of the site containing the widget is used.
If type is campaign, the request object additionally has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
Count only impressions and clicks with the given "path" (described below). |
|
|
Array of String |
No |
Count only impressions and clicks with any of the given "paths" (described below). |
|
|
String |
No |
Count only impressions and clicks towards the given recommendation type. One of |
|
|
String |
No |
Count only impressions and clicks towards the given device type. Examples of values are |
|
|
Integer |
No |
Count only impressions and clicks towards the given position in the widget. |
|
|
Array of Integer |
No |
Count only impressions and clicks towards the given positions in the widget. |
|
|
String |
No |
Count only impressions and clicks towards the given experienceId in the widget. |
|
|
Array of String |
No |
Count only impressions and clicks towards the given experienceIds in the widget. |
|
|
Array of String |
No |
Count only impressions and clicks grouped by the specified group. The available groups are |
If type is page, the request object additionally has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
Count only impressions and clicks towards the given url. Numbers are aggregated on normalized URLs. Unique user numbers or |
If type is conversion, the request object additionally has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
Count only conversions for the given product. |
|
|
Array of String |
No |
Count only conversions for the given products. |
If type is attribution, the request object additionally has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
Count only attribution for the given product site. |
|
|
String |
No |
Count only attribution for the given product. |
|
|
Array of String |
No |
Count only attribution for the given products. |
|
|
String |
No |
Count only attribution for the given widget campaign. |
|
|
Array of String |
No |
Count only attribution for the given widget campaigns. |
For type conversion at least one of productId/s and siteId must be provided. If productId/s is provided, the user must have read access to the site group id and site id of the product. Additionally, site id of all product ids given in one request must be the same.
Response
The response object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The widget ID (as in the request). |
|
|
String |
"UTC" if |
|
|
Array of Number |
The start times of the "buckets" (as Unix time s ordered incrementally). With n buckets, it contains (n + 1) values, where the last value is the stop time of the last bucket. |
|
|
Object |
A stats entry indicating the total for the provided time interval. |
|
|
Array of Object |
A stats entry per "bucket" (in the natural order). |
|
|
Array of String |
The widget IDs. |
|
|
Array of String |
The origin site IDs. |
|
|
Array of String |
The target site IDs. |
If type is campaign, the response object additionally has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of String |
The paths (described below). |
|
|
Array of String |
The recommendation types. |
|
|
Array of Number |
The positions within a widget. |
|
|
Dictionary |
The dictionary from positions to stats entries. |
|
|
Dictionary |
The dictionary from the groups to items, for each group defined in the request. |
groups is excluded from the response if groups is not defined in the request. positionStats and positions are excluded from the response if groups is defined in the request. In order to get positionStats (if groups is defined in the request), consider adding position as a group in the request.
Each group consists of the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The name of the group. |
|
|
Array of Object |
The set of items aggregated for this group. |
Each item consists of the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The name of the item. |
|
|
Object |
The requested metrics and associated aggregated numbers. |
If type is conversion, the response object additionally has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of String |
The products. |
If type is attribution, the response object additionally has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of String |
The product sites. |
|
|
Array of String |
The products. |
|
|
Array of Object |
The campaign stats. |
The campaign stats object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The widget campaign. |
|
|
Array of Number |
The start times of the "buckets" (as Unix time s ordered incrementally). With n buckets, it contains (n + 1) values, where the last value is the stop time of the last bucket. |
|
|
Array of Object |
A stats entry per "bucket" (in the natural order). |
Each stats entry for types campaign and page contains the stats for one history "bucket":
|
Name |
Type |
Description |
|---|---|---|
|
|
Number |
Number of impression requests. |
|
|
Number |
Number of clicks on recommended articles. |
|
|
Number |
Number of impression requests caused by browser auto-refresh. |
|
|
Number |
Number of seconds the impressions were visible in total. Visibility must be reported through |
|
|
Number |
Number of impression requests that were reported to be visible. Visibility must be reported through |
|
|
Number |
How much time on average a user spent reading the destination article after clicking on a recommendation. |
If type is campaign, the stats object additionally has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Number |
The estimated number of unique Cxense-specific identities, without consideration to the identities linked by the customer. For more information see the user identities demystification page . |
Each stats entry for type conversion contains the stats for one history "bucket":
|
Name |
Type |
Description |
|---|---|---|
|
|
Number |
The number of conversion requests. |
|
|
Number |
The estimated number of unique Cxense-specific identities, without consideration to the identities linked by the customer. For more information see the user identities demystification page . |
Each stats entry for type attribution contains the stats for one history "bucket":
|
Name |
Type |
Description |
|---|---|---|
|
|
Number |
The estimated number of conversions directly attributed to one of the campaign of the widget. Direct attribution means the user has clicked on one of the affiliated campaigns with an offer within the last 30 minutes before the conversion. |
Further details
Includes aggregated and real-time data
This API includes both real-time data (the same data that the /traffic API uses) and pre-aggregated data depending on the time ranges queried. Be aware that there can be small fluctuations in the results between different calls to /widget/report, in the same way that is in the traffic API.
With resolution
The timeZone field in the response is "UTC" if useUtc=true in the request; otherwise it is the time zone of the site of the widget.
The start field in the request is rounded down to the nearest hour/week/month, depending on the resolution; and the stop field is rounded down. The rounding off is done with respect to the time zone, and with Monday as the first day of the week.
The report covers the period from (and including) start rounded down to (and excluding) stop rounded up. If start is not before stop after rounding, then the stats array will be empty (and history will have one element).
With historyBuckets
The start and stop fields are rounded down and up respectively, to nearest UTC hour.
Paths
A path is a string of the form <tag 1>/<tag 2>/.../<tag n>consisting of the (non-null) tag fields of a path in the content settings object (seen as a tree).
The stats entries of such a path include every path extension <tag 1>/.../<tag n+1>.
Impressions, clicks and CTR
There will always be one entry in the stats response field for each "time bucket" – even if there were no registered impressions or clicks in the period.
The click-through rate (CTR) is usually calculated as clicks divided by impressions (perhaps multiplied by 100 to get percentage points),but observe that this formula is not always meaningful. Since a click can end up in a later "time bucket" than the corresponding impression,it is possible to have a time bucket with zero impressions and non-zero clicks.
You should also be aware that if you specify path (or siteId) in the request object, then the stats entry field impressions is a relative number:If, for example, only one of four recommended articles has the given path, then this is counted as 1/4 of an impression.
Example
$ cx.py widget/report '{"widgetId":"ce048abf333263a1c23b5825f48e7a40a1bc9b87","start":"2014-01-21T18:00:00.000Z","stop":"2014-01-22T00:00:00.000Z","resolution":"hour"}'
{
"widgetId": "ce048abf333263a1c23b5825f48e7a40a1bc9b87",
"timeZone": "Asia/Tokyo",
"history": [
1390327200,
1390330800,
1390334400,
1390338000,
1390341600,
1390345200,
1390348800
],
"stats": [
{
"impressions": 1255,
"clicks": 47,
"autoRefreshes": 1,
},
{
"impressions": 1033,
"clicks": 54,
"autoRefreshes": 1
},
{
"impressions": 1045,
"clicks": 54
"autoRefreshes": 1
},
{
"impressions": 1466,
"clicks": 42,
"autoRefreshes": 1
},
{
"impressions": 2150,
"clicks": 78,
"autoRefreshes": 1
},
{
"impressions": 4542,
"clicks": 144,
"autoRefreshes": 1
}
],
"widgetIds": [
"ce048abf333263a1c23b5825f48e7a40a1bc9b87"
],
"siteIds": [
"9222326071608921377"
],
"paths": [
"a/1",
"a"
],
"targetSiteIds": [
"9222326071608921377"
]
}