For the complete documentation index, see llms.txt. This page is also available as Markdown.

Global Statistics API

This section describes the Global Statistics API request parameters and result data.

The statistics API routes have been renamed:

  • /statistics/advertiser/... -> /statistics/a/...

  • /statistics/publisher/... -> /statistics/p/...

The Global Statistics API only shows skipped RTB queries for Date, Sites, Zones, Countries, Regions, and Sub IDs.

Parameter
Description
Notes
Type

count

Return only the total of results.

integer

optional

detailed

Get more detail if possible.

integer

optional

timezone

Timezone setting for 'hour' filter and 'group_by'

string

optional

totals

Indicates whether add totals to response or not.

integer

optional

filter

Filters to restrict the returned values of a statistics query

object

optional

group_by

A list of group by values to be applied in the data. Maximum four are permitted.

array

mandatory

order_by

Ordering of results by a specific field(s). A maximum of two are permitted.

array

optional

projection

Individual sub-structures a user wants to have returned in the response.

array

optional

limit

The number of records to return in this response.

integer

optional

offset

The position to retrieve the records from.

integer

optional

Parameter count

Property

count

Type

optional

Variable type

integer

Default Value

0

Available values

[0, 1]

Description

Return only the total of results.

Example:

Parameter detailed

Property

detailed

Type

optional

Variable type

integer

Default Value

0

Available values

[0, 1]

Description

Whether to return detailed information or not.

Example:

Parameter timezone

Timezone setting for hour filter and group_by.

Property

timezone

Type

optional

Variable type

string

Default Value

America/New_york

Available values

Set timezone field of / collections / timezones

Description

NOTE: Timezones are only relevant when we are querying based on hourly data, for non-hourly data this is a no-op.

Example:

Parameter totals

Property

totals

Type

optional

Variable type

integer

Default Value

0

Available values

[0,1]

Description

Indicates whether add totals to response or not.

Example:

Parameter filter

Property

filter

Type

optional

Variable type

object

Available option for Advertisers

[”adblock”, ”advertiser_ad_type_id”, “browser_id”, “carrier_id”, “category_id”, “country_iso”, “date_from”, “date_to”, “device_id”, “device_type_id”, hour”, “language_id”, “operating_system_id”, “region_id”, “site_hostname”, “site_id”, “size”, “sub”, “zone_id”, “campaign_group_id”, “campaign_id”, “exclude_deleted”, “offer_id”, “offer_landing_page_id”, “variation_id”]

Available option for Publishers

[”adblock”, “browser_id”, “carrier_id”, “category_id”, “country_iso”, “date_from”, “date_to”, “device_id”, “device_type_id”, “hour”, “language_id”, “operating_system_id”, “region_id”, “site_hostname”, “site_id”, “zone_id”, “publisher_ad_type_id”, “size”, “sub”]

Description

Filter by certain parameters.

Filter: country_iso

Property

country_iso

Type

optional

Variable type

string

Default Value

-

Available values

See /collections/countries endpoint iso3 property

Description

List of ISO 3 code

Example:

Filter date_from, date_to

The date_from and date_to parameters control the window over which you want to fetch stats information.

  • date_from: Date from range for statistics, (Default beginning of month),

  • date_to: Date to range for statistics, (Default today)

Property

date_from, date_to

Type

optional

Variable type

string

Default Value

The dates default to the current month.

Available values

YYYY-mm-dd

Description

Date from/to range for statistics. Format YYYY-mm-dd

Example:

Timezones are only relevant when we are querying based on hourly data, for non-hourly data this is a no-op.

Filter: advertiser_ad_type_id, campaign_group_id, campaign_id, browser_id, carrier_id, category_id, device_id, device_type_id, language_id, offer_id, offer_landing_page_id, operating_system_id, hour, region_id, site_id, sub, variation_id, zone_id, publisher_ad_type_id

Property

advertiser_ad_type_id, campaign_group_id, campaign_id, browser_id, carrier_id, category_id, device_id, device_type_id, language_id, offer_id, offer_landing_page_id, operating_system_id, hour, region_id, site_id, sub, variation_id, zone_id, advertiser_ad_type_id, publisher_ad_type_id

Type

optional

Variable type

array

Items type

integer

Default Value

-

Available values

Relative properties OR collections

Description

List of entity Ids

Example:

Filter: exclude_deleted

Property

exclude_deleted

Type

optional

Variable type

integer

Default Value

0

Available values

[0, 1]

Description

Whether to exclude deleted campaigns or not.

Example:

Filter: adblock

Property

adblock

Type

optional

Variable type

string

Default Value

"all"

Available values

"adblock", "all", "standard"

Description

Whether to include adblock zones or not.

Example:

Filter: site_hostname

Property

site_hostname

Type

optional

Variable type

string

Default Value

-

Available values

Valid characters for hostnames are letters from a to z, the digits from 0 to 9, hyphen and dot.

Description

Filter by site hostname.

Example:

Filter: size

Property

size

Type

optional

Variable type

string

Default Value

-

Available values

Valid characters for size are the digits from 0 to 9 and x character. Example 300x100

Description

Filter by size

Example:

Parameter group_by

Property

group_by

Type

mandatory

Variable type

array

Items type

string

Default Value

-

Available values for Advertisers

[”adblock”, “advertiser_ad_type_id”, browser_id”, “idcampaign_group“, “campaign_id”, “carrier_id”, “category_id”, “country_iso”, “date”, “hour”, “device_id”, “device_type_id”, “language_id”, “operating_system_id”, “region_id”, “site_id”, “sub”, “zone_id”, “week”, “month”, “quarter”, “year”, “offer_id”, “offer_landing_page_id”, “site_hostname”, “size”, “variation_id”]

Available values for Publishers

[“adblock”, “browser_id”, “carrier_id”, “category_id”, “country_iso”, “date”, “device_id”, “device_type_id”, “hour”, “language_id”, “operating_system_id”, “publisher_ad_type_id” “region_id”, “site_id”, “size”, “sub”, “zone_id”, “week”, “month”, “quarter”, “year”]

Description

A list of sub-requests to include additional data in response.

Example:

Parameter order_by

Property
order_by

Type

optional

Variable type

array

Items type

string

Default Value

-

Available metrics field values

[“cpc”, “cpc”, “cpm”, “cpv”, “ctr”, “clicks”, “impressions”, “video_impressions”, “video_views”, “vtr”, “rtb_win_ratio”, “rtb_avg_total_time”, “rtb_skipped”, “rtb_bid_response_ratio”, “rtb_avg_cpm”, “rtb_timeouts_ratio”, “rt_errors_ratio”, “rtb_no_bid_ratio”, “rtb_skipped_ratio”]

Available field values dependent on `group_by’ for Advertisers

[”adblock”, “browser_id”, “campaign_id”, “carrier_id”, “category_id”, “country_iso”, “device_id”, “date”, “device_type_id”, “hour”, “ecpa1”, “g1”,“language_id”, “month”, “offer_id”, “offer_landing_page_id”, “operating_system_id”, “quarter”, “region_id”, “site_hostname”, “site_id”, “sub”, “variation_id”, “week”, “year” ,“zone_id”]

Available field values dependent on `group_by’ for Publishers

[“adblock”, “browser_id”, “carrier_id”, “category_id”, “country_iso”, “device_id”, “date”, “device_type_id” , “hour”, “language_id”, “month”, “operating_system_id”, “quarter”, “region_id”, “site_id”, “sub”, “week”, “year”, “zone_id”]

Available order values

[“asc”, “desc”]

Description

A list of available order by options

Hints:

  • The metrics fields are available all the time to use as order by field.

  • To order by specific value (for example by “browser_id”), you need to include it in “group_by” parameter.

The “g1”, “ecpa1” values are only available when user has Conversion Tracking (Goals). All goals associated with a serial number (g1, g2, …gx). The eCPA values are accordingly ecpa1, ecpa2, …ecpax.

Example:

Example to organize the campaign results chronologically, the “date” need to be included in both “group_by” and “order_by”:

Parameter projection

The projection parameter reflects what will be returned in the resulting payload. If not specified all sub structures will be returned.

Property
projection

Type

optional

Variable type

object

Items type

array

Default value

all options, see below

Available field values for Advertisers

[“base”, “rtb”, “video”, “goals*”]

Available field values for Publishers

[“base”, “rtb”, “video”, “wpn”]

*Some "goal" fields, like "profit" and "roi", are calculated based on the cost of the campaign, so you must also use "base" field if you want to receive the correct "goals" metrics.

Examples:

In order to receive all possible metrics as an advertiser, use:

In order to receive all possible metrics as a publisher, use:

You can also specify the metrics within each projection field:

The only field that does not allow specific metric projection is "goals"

Parameter limit

The number of records to return in this response.

Property

limit

Type

optional

Variable type

integer

Default Value

50

Example:

Parameter offset

The position to retrieve the records from.

Property

offset

Type

optional

Variable type

integer

Default Value

0

Example

Example 1

Advertiser campaign statistic with filtering.

Request:

Response:

Example 2

Advertiser statistic by date for the current month ordered by impressions.

Request:

Response:

Example 3

Publisher statistic by date and region_id, ordered by impressions.

Request:

Response:

Example 4

Publisher statistic by site_id with projection.

Request:

Response

Last updated

Was this helpful?