The API endpoint for campaign distribution.
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/distributions
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 identifier. See EntityId. |
|
|
String |
Campaign name. |
|
|
Array of String |
List of campaign row names. |
|
|
Map |
Distribution by operating system. See OsDistribution. |
|
|
Array of Object |
Segment group overviews. See SegmentGroupOverview. |
|
|
Object |
Aggregated campaign statistics. See CampaignRowSummary. |
OsDistribution
Each os distribution object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
OS type. One of: |
|
|
Float |
Impression count for the corresponding OS. |
CampaignRowSummary
Each aggregatedStats object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Integer |
Count of ad impressions, obtained from adserver. |
|
|
Integer |
Count of in-screen impressions, obtained from adserver. |
|
|
Float |
Viewability rate (adImpressions / inScreenImpressions), in percent. |
|
|
Integer |
Click count, obtained from adserver. |
|
|
Float |
Click-through rate in percent. |
|
|
Integer |
Percent CTR difference compared to the previous day's value. |
|
|
Float |
Average time in screen (in seconds), calculated on BPP. |
|
|
Integer |
Percent difference of screen average time compared to the previous day. |
|
|
Integer |
Number of users, obtained from adserver. |
|
|
Float |
Percentage of times the video played to the end. |
|
|
Float |
Total time in screen (in seconds), calculated on BPP. |
|
|
Integer |
Unique click count, obtained from adserver. |
|
|
Float |
Unique click-through rate in percent. |
SegmentGroupOverview
Each segment group overview object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Segment category name. |
|
|
String |
Segment group name. |
|
|
Array of Object |
List of segment statistics. See SegmentStat. |
SegmentStat
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Segment ID. |
|
|
String |
Segment name. |
|
|
Float |
Percentage of ad impressions, calculated on BPP. |
|
|
Float |
Click-through rate in percent. |
|
|
Float |
Percentage of users, calculated on BPP. |
|
|
Float |
Percentage of average in-screen time, calculated on BPP. |
|
|
Boolean |
Indicates if the segment was used for targeting. |
Examples
$ cx.py https://audience-api-gui.piano.io/campaign-reporting/v2/campaign/distributions '{"entityId":{"id":"1111","adServerType":"DFP"},"campaignRows":["12345"],"siteGroupId":"11223344556677889900"}'
{
"campaignId": {
"id": "12345678",
"adServerType": "DFP"
},
"campaignName": "campaign name",
"campaignRowsNames": [
"12345 | campaign row name 2024"
],
"segmentGroupsOverview": [
{
"categoryName": "Custom",
"groupName": "SOCIODEMO - GENDER - MAIN",
"segmentStats": [
{
"id": "dfdoiv2r3b49",
"name": "GENDER - Female",
"impressions": 0.50574714,
"ctr": 0.0,
"users": 0.5125,
"inScreenAvg": 0.0,
"usedForTargeting": false
}
]
},
{
"categoryName": "Custom",
"groupName": "SOCIODEMO - CITY",
"segmentStats": [
{
"id": "8m3455q7k6im",
"name": "CITY - name",
"impressions": 5.417118E-4,
"ctr": 0.0,
"users": 7.686395E-4,
"inScreenAvg": 0.0,
"usedForTargeting": false
},
{
"id": "8mfsfgq7k6ir",
"name": "CITY - name1",
"impressions": 0.0016251354,
"ctr": 0.0,
"users": 0.0023059186,
"inScreenAvg": 0.0,
"usedForTargeting": false
}
]
}
],
"osDistribution": {
"WINDOWS": 0.41440955,
"UNIX": 0.004875406,
"LINUX": 0.0037919828,
"MAC": 0.048754063,
"IOS": 0.12513542,
"ANDROID": 0.40303358
},
"aggregatedStats": {
"adImpressions": 2285,
"inScreenImpressions": 1629,
"clicks": 3,
"ctr": 0.0013129102,
"viewabilityRate": 0.7129103,
"ctrDiff": 0.0,
"inScreenAvg": 9.405288,
"inScreenAvgDiff": 0.0,
"users": 1419,
"inScreenTime": 0,
"uniqueClicks": 0,
"uniqueCtr": 0.0,
"videoCompletionRate": 0.0
}
}