The API endpoint for total campaign stats, by date, by creatives, by placements.
The user must be authenticated and have read permissions to the given site group.
API URL
https://audience-api-gui.piano.io/campaign-reporting/v2/campaign-row/overview
Request
The request object has the following fields:
EntityId
Each entityId object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
Yes |
Adserver entity ID. |
|
|
String |
Yes |
Adserver type. One of: |
DateRange
Each dateRange object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
Yes |
Start date (inclusive), format such as |
|
|
String |
Yes |
End date (inclusive), format such as |
Response
The response object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Object |
Campaign row data. See Campaign row. |
|
|
Integer |
Count of ad impressions, obtained from adserver. |
|
|
Integer |
Count of in screen impressions, obtained from adserver. |
|
|
Float |
Viewability rate = |
|
|
Integer |
Click count, obtained from adserver. |
|
|
Float |
Click-through rate (CTR) in percent. |
|
|
Integer |
Percentage CTR difference compared to the previous day's value. |
|
|
Integer |
Unique clicks, from BPP or adserver (if supported). |
|
|
Float |
Unique CTR in percent. |
|
|
Float |
Average time in screen (seconds), calculated on BPP. |
|
|
Integer |
Percentage difference of in-screen average compared to the previous day's value. |
|
|
Float |
Total time in screen (seconds), calculated on BPP. |
|
|
Integer |
User count, obtained from adserver. |
|
|
Float |
Percentage of times the video was played to the end. |
|
|
Array of Objects |
List of creative statistics. See Creative stats. |
|
|
Array of objects |
List of placement statistics. See Placement stats. |
Campaign row
Each campaignRow object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Object |
Campaign row entity. See EntityId. |
|
|
Object |
Campaign entity. See EntityId. |
|
|
String |
Campaign-row name. |
|
|
Integer |
Campaign-row start time as Unix timestamp. |
|
|
Integer |
Campaign-row end time as Unix timestamp. |
|
|
Integer |
Last campaign-row synchronization time (Unix timestamp). |
|
|
Integer |
Last campaign-row update time (Unix timestamp). |
|
|
String |
Campaign status. One of: |
|
|
String |
Channel in which ads are served. One of: |
|
|
String |
Goal type. One of: |
|
|
Integer |
Goal value. |
|
|
Integer |
Goal completion value. |
|
|
String |
Campaign row type. One of: |
|
|
Integer |
Configuration ID. |
|
|
Boolean |
Whether pixel placeholder is present. |
|
|
Integer |
Number of impressions. |
|
|
Integer |
Number of clicks. |
|
|
Float |
Click-through rate. |
|
|
Array of Objects |
List of creatives. See CreativeInfo. |
|
|
Object |
The amount of money to spend per impression or click. See CostPerUnit. |
|
|
String |
Three letter currency code in string format. |
|
|
String |
The strategy for serving roadblocked creatives. |
CreativeInfo
Each creative info object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Creative info name. |
|
|
Integer |
Last creative update time (Unix timestamp). |
|
|
String |
URL to creative content data. |
|
|
String |
Content type of creative content data. |
|
|
Integer |
Width of the corresponding creative. |
|
|
Integer |
Height of the corresponding creative. |
|
|
Integer |
Configuration ID. |
|
|
Object |
Creative entity. See EntityId. |
CostPerUnit
Each cost per unit object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The method used for billing. One of: |
|
|
Float |
Cost value |
CreativeStats
Each creative stat object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Creative ID. |
|
|
String |
Creative name. |
|
|
String |
URL to creative content data. |
|
|
String |
Content type of creative content data. |
|
|
Integer |
Width of the corresponding creative. |
|
|
Integer |
Height of the corresponding creative. |
|
|
Object |
See CreativeVideoStats. |
|
|
Integer |
Impressions count (from BPP or adserver if available). |
|
|
Integer |
Clicks count (from BPP or adserver if available). |
|
|
Float |
Clicks / adImpressions in percent. |
|
|
Object |
See ClickedSegment. |
|
|
Object |
See ClickedSegment. |
|
|
Integer |
InScreenImpressions count. |
|
|
Float |
Total amount of time that an ad has been in screen. |
PlacementStats
Each placement stat object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
— |
|
|
Float |
Percentage of time by site. |
|
|
Integer |
Total impressions by all sections. |
|
|
Float |
Percentage of total impressions by all sections. |
|
|
Integer |
Total clicks by all sections. |
|
|
Float |
Percentage of total clicks by all sections. |
|
|
Float |
Percentage of CTR. |
|
|
Array of Objects |
See array of SectionStat. |
CreativeVideoStats
Stats of video creatives are presented only for creatives with video content, obtained from adserver.
Each creative video stat object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Float |
Percentage of impressions of start video ad. |
|
|
Float |
Percentage of impressions of first quarter of video ad. |
|
|
Float |
Percentage of impressions of second quarter of video ad. |
|
|
Float |
Percentage of impressions of third quarter of video ad. |
|
|
Float |
Percentage of impressions of full video ad. |
ClickedSegment
Each clicked segment object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Segment ID. |
|
|
String |
Segment name. |
SectionStat
Each section stat object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Site section URL. |
|
|
Integer |
Section impressions, obtained by calculating on BPP. |
|
|
Float |
Percentage of section impressions, obtained by calculating on BPP. |
|
|
Integer |
Section clicks, obtained by calculating on BPP. |
|
|
Float |
Percentage of section clicks, obtained by calculating on BPP. |
|
|
Float |
Percentage of CTR. |
Examples
$ cx.py https://audience-api-gui.piano.io/campaign-reporting/v2/campaign-row/overview '{"entityId":{"id":"1234567890","adServerType":"DFP"},"siteGroupId":"11223344556677889900"}'
{
"campaignRow": {
"id": {
"id": "1234567890",
"adServerType": "DFP"
},
"configId": 1,
"name": "cxense test",
"startDate": 1630937460000,
"endDate": 1641067140000,
"status": "FINISHED",
"synchronizedOn": 1666652557814,
"lastModified": 1630937408000,
"channel": "display",
"localGoalType": "IMPRESSIONS",
"goalValue": 200000,
"creatives": [],
"campaignId": {
"id": "12345",
"adServerType": "DFP"
},
"hasPixelPlaceholder": false,
"goalComplete": 1.4E-4,
"adImpressions": null,
"clicks": null,
"ctr": null,
"type": "STANDARD",
"costPerUnit": {
"cost": 0.0,
"costType": "CPM"
},
"currencyType": "RUB",
"roadBlockingType": null
},
"adImpressions": 28,
"inScreenImpressions": 28,
"viewabilityRate": 1.0,
"clicks": 1,
"ctr": 0.035714287,
"ctrDiff": 0.0,
"uniqueClicks": 0,
"uniqueCtr": 0.0,
"inScreenAvg": 0.0,
"inScreenAvgDiff": 0.0,
"inScreenTotal": 0.0,
"users": 6,
"videoCompletionRate": 0.0,
"creativeStats": [
{
"id": "12345",
"name": "Cxense test",
"url": "https://url.com/imgad?id=uJvidiRQ",
"contentType": "text/html",
"width": 200,
"height": 200,
"videoStats": {
"start": 0.0,
"midpoint": 0.0,
"firstQuartile": 0.0,
"thirdQuartile": 0.0,
"complete": 0.0
},
"adImpressions": 28,
"clicks": 1,
"clickRate": 0.035714287,
"mostClickedSegment": null,
"leastClickedSegment": null,
"inScreenImpressions": 28,
"inScreenAvg": 0.0
}
],
"placementStats": [
{
"site": "dmp-test.com.amazonaws.com",
"screenTime": 0.0,
"amountImpressions": 19,
"totalImpressions": 0.95,
"amountClicks": 0,
"totalClicks": 0.0,
"ctr": 0.0,
"sections": []
},
{
"site": "dmp-test.cxense.com",
"screenTime": 0.0,
"amountImpressions": 1,
"totalImpressions": 0.05,
"amountClicks": 0,
"totalClicks": 0.0,
"ctr": 0.0,
"sections": []
}
]
}