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

Audience API: /campaign-reporting/v2/campaign-row/overview

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:

Name

Type

Required

Description

entityId

Object

Yes

Adserver campaign row entity object. See EntityId.

siteGroupId

String

No

The site group ID.

dateRange

Object

No

The data range. See DateRange.

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

campaignRow

Object

Campaign row data. See Campaign row.

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 (CTR) in percent.

ctrDiff

Integer

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

uniqClicks

Integer

Unique clicks, from BPP or adserver (if supported).

uniqCtr

Float

Unique CTR in percent.

inScreenAvg

Float

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

inScreenAvgDiff

Integer

Percentage difference of in-screen average compared to the previous day's value.

inScreenTotal

Float

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

users

Integer

User count, obtained from adserver.

videoCompletionRate

Float

Percentage of times the video was played to the end.

creativeStats

Array of Objects

List of creative statistics. See Creative stats.

placementStats

Array of objects

List of placement statistics. See Placement stats.

Campaign row

Each campaignRow object has the following fields:

Name

Type

Description

id

Object

Campaign row entity. See EntityId.

campaignId

Object

Campaign entity. See EntityId.

name

String

Campaign-row name.

startDate

Integer

Campaign-row start time as Unix timestamp.

endDate

Integer

Campaign-row end time as Unix timestamp.

synchronizedOn

Integer

Last campaign-row synchronization time (Unix timestamp).

lastModified

Integer

Last campaign-row update time (Unix timestamp).

status

String

Campaign status. One of: PLANNED, SUBMITTED, ACCEPTED, ACTIVE, HOLD, FINISHED, CANCELED, DELETED, ARCHIVED, UNKNOWN.

channel

String

Channel in which ads are served. One of: display, video, unknown.

localGoalType

String

Goal type. One of: IMPRESSIONS, VIEW_IMPRESSIONS, CLICKS, SHARE_OF_VOICE, UNLIMITED, FIRST_QUARTILE, SECOND_QUARTILE, THIRD_QUARTILE, COMPLETE, UNKNOWN.

goalValue

Integer

Goal value.

goalComplete

Integer

Goal completion value.

type

String

Campaign row type. One of: SPONSORSHIP, STANDARD, NETWORK, BULK, PRICE_PRIORITY, HOUSE, LEGACY_DFP, CLICK_TRACKING, ADSENSE, AD_EXCHANGE, BUMPER, ADMOB, PREFERRED_DEAL, UNKNOWN

configId

Integer

Configuration ID.

hasPixelPlaceholder

Boolean

Whether pixel placeholder is present.

adImpressions

Integer

Number of impressions.

clicks

Integer

Number of clicks.

ctr

Float

Click-through rate.

creatives

Array of Objects

List of creatives. See CreativeInfo.

costPerUnit

Object

The amount of money to spend per impression or click. See CostPerUnit.

currencyType

String

Three letter currency code in string format.

roadBlockingType

String

The strategy for serving roadblocked creatives.

CreativeInfo

Each creative info object has the following fields:

Name

Type

Description

name

String

Creative info name.

lastModified

Integer

Last creative update time (Unix timestamp).

link

String

URL to creative content data.

contentType

String

Content type of creative content data.

width

Integer

Width of the corresponding creative.

height

Integer

Height of the corresponding creative.

configId

Integer

Configuration ID.

entityId

Object

Creative entity. See EntityId.

CostPerUnit

Each cost per unit object has the following fields:

Name

Type

Description

costType

String

The method used for billing. One of: CPC, CPM

cost

Float

Cost value

CreativeStats

Each creative stat object has the following fields:

Name

Type

Description

id

String

Creative ID.

name

String

Creative name.

url

String

URL to creative content data.

contentType

String

Content type of creative content data.

width

Integer

Width of the corresponding creative.

height

Integer

Height of the corresponding creative.

videoStats

Object

See CreativeVideoStats.

adImpressions

Integer

Impressions count (from BPP or adserver if available).

clicks

Integer

Clicks count (from BPP or adserver if available).

clickRate

Float

Clicks / adImpressions in percent.

mostClickedSegment

Object

See ClickedSegment.

leastClickedSegment

Object

See ClickedSegment.

inScreenImpressions

Integer

InScreenImpressions count.

inScreenAvg

Float

Total amount of time that an ad has been in screen.

PlacementStats

Each placement stat object has the following fields:

Name

Type

Description

site

String

screenTime

Float

Percentage of time by site.

amountImpressions

Integer

Total impressions by all sections.

totalImpressions

Float

Percentage of total impressions by all sections.

amountClicks

Integer

Total clicks by all sections.

totalClicks

Float

Percentage of total clicks by all sections.

ctr

Float

Percentage of CTR.

sections

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

start

Float

Percentage of impressions of start video ad.

firstQuartile

Float

Percentage of impressions of first quarter of video ad.

midpoint

Float

Percentage of impressions of second quarter of video ad.

thirdQuartile

Float

Percentage of impressions of third quarter of video ad.

complete

Float

Percentage of impressions of full video ad.

ClickedSegment

Each clicked segment object has the following fields:

Name

Type

Description

id

String

Segment ID.

name

String

Segment name.

SectionStat

Each section stat object has the following fields:

Name

Type

Description

section

String

Site section URL.

amountImpressions

Integer

Section impressions, obtained by calculating on BPP.

impressions

Float

Percentage of section impressions, obtained by calculating on BPP.

amountClicks

Integer

Section clicks, obtained by calculating on BPP.

clicks

Float

Percentage of section clicks, obtained by calculating on BPP.

ctr

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": []
 }
 ]
}

Last updated: