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

Audience API: /campaign-reporting/v2/campaign/distributions

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:

Name

Type

Required

Description

entityId

Object

Yes

Adserver campaign row entity object. See EntityId.

siteGroupId

String

Yes

The site group ID.

campaignRows

Array of String

No

List of campaign rows.

dateRange

Object

No

The data range. See DateRange.

siteFilterIds

Array of Integer

No

List of sites.

EntityId

Each entityId object has the following fields:

Name

Type

Required

Description

id

String

Yes

Adserver entity ID.

adServerType

String

Yes

Adserver type. One of: DFP, ADFORM, OUTBRAIN, TABOOLA, NATIVO.

DateRange

Each dateRange object has the following fields:

Name

Type

Required

Description

start

String

Yes

Start date (inclusive), format such as '2011-12-03'.

stop

String

Yes

End date (inclusive), format such as '2011-12-03'.

Response

The response object has the following fields:

Name

Type

Description

campaignId

Object

Campaign identifier. See EntityId.

campaignName

String

Campaign name.

campaignRowsNames

Array of String

List of campaign row names.

osDistribution

Map

Distribution by operating system. See OsDistribution.

segmentGroupsOverview

Array of Object

Segment group overviews. See SegmentGroupOverview.

aggregatedStats

Object

Aggregated campaign statistics. See CampaignRowSummary.

OsDistribution

Each os distribution object has the following fields:

Name

Type

Description

osType

String

OS type. One of: WINDOWS, UNIX, LINUX, MAC, IOS, ANDROID, WINDOWS_MOBILE, OTHER_UNKNOWN.

imps

Float

Impression count for the corresponding OS.

CampaignRowSummary

Each aggregatedStats object has the following fields:

Name

Type

Description

adImpressions

Integer

Count of ad impressions, obtained from adserver.

inScreenImpressions

Integer

Count of in-screen impressions, obtained from adserver.

viewabilityRate

Float

Viewability rate (adImpressions / inScreenImpressions), in percent.

clicks

Integer

Click count, obtained from adserver.

ctr

Float

Click-through rate in percent.

ctrDiff

Integer

Percent CTR difference compared to the previous day's value.

inScreenAvg

Float

Average time in screen (in seconds), calculated on BPP.

inScreenAvgDiff

Integer

Percent difference of screen average time compared to the previous day.

users

Integer

Number of users, obtained from adserver.

videoCompletionRate

Float

Percentage of times the video played to the end.

inScreenTime

Float

Total time in screen (in seconds), calculated on BPP.

uniqueClicks

Integer

Unique click count, obtained from adserver.

uniqueCtr

Float

Unique click-through rate in percent.

SegmentGroupOverview

Each segment group overview object has the following fields:

Name

Type

Description

categoryName

String

Segment category name.

groupName

String

Segment group name.

segmentStats

Array of Object

List of segment statistics. See SegmentStat.

SegmentStat

Name

Type

Description

id

String

Segment ID.

name

String

Segment name.

impressions

Float

Percentage of ad impressions, calculated on BPP.

ctr

Float

Click-through rate in percent.

users

Float

Percentage of users, calculated on BPP.

inScreenAvg

Float

Percentage of average in-screen time, calculated on BPP.

usedForTargeting

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
 }
}

Last updated: