Skip to main content

Statistics

GET /publisher/stats

Parameters

NameTypeVariable typeDefault ValueAvailable valuesDescription
tokenrequiredstringNULLTokenAPI Token for your account.
date_fromoptionalstringBeginning of monthYYYY-mm-ddDate from the range for stats. Format YYYY-mm-dd
date_tooptionalstringTodayYYYY-mm-ddDate from the range for stats. Format YYYY-mm-dd
country_isooptionalstringNULLISO 3166-1 alpha-3Filter stats to one specified country with ISO 3166-1 alpha-3 code
site_idoptionalintegerNULLSite IDFilter stats to one specified site.
zone_idoptionalintegerNULLZone IDFilter stats to one specified zone id.
deviceoptionalstringNULLDesktop, Mobile, TabletFilter stats to one specified device.
zone_typeoptionalstringNULLPopunder, Outstream Video, Video Slider, In-Stream VideoFilter stats to one specified zone type.
suboptionalintegerNULLSub IDFilter stats to one specified sub id.
group_byoptionalstringdatedate, device, sub, zone_id, site_id, zone_type, countryGroups rows that have the same values into summary rows
order_byoptionalstringdate:ascdate, device, sub, zone_id, site_id, zone_type, country, :asc, :descSort 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.
limitoptionalinteger50integerThe number of records to return in this request. The minimum value is 1. The maximum value is 2000.
offsetoptionalinteger0integerThe position to retrieve the records from. The minumum value is 0

Request example

https://api.ensoclick.com/publisher/stats?token=1c39bAL5ms&date_from=2020-01-01&zone_id=1357&group_by=country&order_by=country:asc

Response example

{
"request_metadata": {
"count": 225,
"limit": 50,
"offset": 0

},
"result": {
"0": {
"impressions":192517,
"clicks":2711,
"revenue":26.082,
"country":"Australia",
"country_iso":"AUS",
"cpm":0.135,
"ctr":1.41,
"cpc":0.010
},
"1": {
"impressions":16732,
"clicks":287,
"revenue":1.611,
"country":"Austria",
"country_iso":"AUT",
"cpm":0.096,
"ctr":1.72,
"cpc":0.006
},
...
}
}