Statistics
GET /advertiser/stats
Parameters
Name | Type | Variable type | Default Value | Available values | Description |
---|---|---|---|---|---|
token | required | string | NULL | Token | API Token for your account. |
date_from | optional | string | Beginning of month | YYYY-mm-dd | Date from the range for stats. Format YYYY-mm-dd |
date_to | optional | string | Today | YYYY-mm-dd | Date from the range for stats. Format YYYY-mm-dd |
country_iso | optional | string | NULL | ISO 3166-1 alpha-3 | Filter stats to one specified country with ISO 3166-1 alpha-3 code |
site_id | optional | integer | NULL | Site ID | Filter stats to one specified site. |
campaign_id | optional | integer | NULL | Campaign ID | Filter stats to one specified campaign id. |
zone_id | optional | integer | NULL | Zone ID | Filter stats to one specified zone id. |
device | optional | string | NULL | Desktop, Mobile, Tablet | Filter stats to one specified device. |
zone_type | optional | string | NULL | Popunder, Outstream Video, Video Slider, In-Stream Video | Filter stats to one specified zone type. |
sub | optional | integer | NULL | Sub ID | Filter stats to one specified sub id. |
group_by | optional | string | date | date, device, sub, zone_id, site_id, zone_type, country | Groups rows that have the same values into summary rows |
order_by | optional | string | date:asc | date, device, sub, zone_id, site_id, zone_type, country, :asc, :desc | Sort the result set in ascending or descending order. To sort the records in ascending order, use :asc. To sort the records in descending order, use :desc. |
limit | optional | integer | 50 | integer | The number of records to return in this request. The minimum value is 1. The maximum value is 2000. |
offset | optional | integer | 0 | integer | The position to retrieve the records from. The minumum value is 0 |
Request example
https://api.ensoclick.com/advertiser/stats?token=1c39bAL5ms&date_from=2020-01-01&zone_id=1357&group_by=country&order_by=country:asc
Response example
{
"request_metadata": {
"count":8,
"limit":50,
"offset":0
},
"result": {
"0": {
"impressions":192517,
"clicks":0,
"spend":26.082,
"country":"Australia",
"zone_id":1357,
"camp_type":"Popunder",
"country_iso":"AUS",
"cpm":0.135,
"ctr":0.00,
"cpc":0.000
},
"1": {
"impressions":2,
"clicks":0,
"spend":0.001,
"country":"France",
"zone_id":1357,
"camp_type":"Popunder",
"country_iso":"FRA",
"cpm":0.500,
"ctr":0.00,
"cpc":0.000
},
...
}
}