This API allows the Advertising and Publishing statistics collected by the Cxense Advertising platform to be accessed. These statistics can be retrieved in summary or detailed format across a specified date range, and for multiple statistics objects.
Retrieving summary statistics
GET
Retrieves statistics totals for specified objects.
cxadbaseurl - the base URL of the Cxense Advertising system.
chunk - the granularity of each #chunk of data retrieved.
refs1 - a comma-separated list of Campaign or Advertisement #refs to retrieve keyword statistics for.
start - the start #date of the range (inclusive) to retrieve keyword statistics for.
end - the end #date of the range (exclusive) to retrieve keyword statistics for.
tz - (optional) the timezone of start date and end date. Default: UTC.
includeDeleted - (optional) whether to include stats for deleted keywords. Default: false
1 The stats/keywords/{chunk} method does not cascade to child container objects of a specified refs=objectId. For example, if you wish to GET total keyword stats for a Campaign, you must list all child Ad adId values in the refs= parameter.
To obtain a list of child Ad adId values for a Campaign, use the respective campaignId value in an Advertisement REST API - GET request.
The example below illustrates specifying multiple objectId values in the refs= parameter.
Example command:
curl -s -H "Content-type: text/xml" -u jsmith:password1 -X GET "https://cxad.cxense.com/api/secure/stats/keywords/day?refs=000000000000476a,0000000000004779&start=201101290000&end=201201290000&tz=Europe/Oslo"
The following XML example shows the contents returned from a typical GET call:
Specifies the type of statistics to retrieve. It must be one of:
"advertiser"
"publisher"
Each type returns a different set of data. Objects will not necessarily have statistics for every type.
chunk
Specifies the granularity of the detailed data to retrieve. It must be one of:
"year"
"month"
"week"
"day"
"hour"
refs
References specify a comma-separated list of statistics objects to retrieve.
A statistics object is generally an object id (e.g. 0000000000004a94) or and object id plus expression id (eg 0000000000004a94:a123cf045669a456).
date
Specifies a date-time in the format YYYYmmDDHHMM. e.g. "201101290930" for 29 January 2010 at 9:30 am.
The specified value must fall on a boundary of the chunk size.
tz
Specifies a timezone of start date and end date.
Timezone ID. e.g. "Asia/Tokyo", "Australia/Melbourne" ...etc.
Offset from UTC. e.g. "+09:00" or "+0900" (URL encode is required. e.g. +09:00 -> %2B09%3A00)
Output details
All values below are computed for the specified refs and the specified period.
adImpressions
Impression count, exclusive of filteredAdImpressions.
filteredAdImpressions
Map from impression filter type to impression filter counts
clicks
Click count, exclusive of filteredClicks
filteredClicks
Map from click filter type to click filter counts
actions
Map of action counts, exclusive of filteredActions
filteredActions
Map of maps from action filter type to action filter count
auctionRankSum
The sum of ad auction ranks for all impressions. Useful for computing the average position for reports.
averagePosition = auctionRankSum / adImpressions
cost
Total cost of all events, exclusive of overage
overage
Total overage of all events, that is the total costs incurred above a requested set of budgets
uniqueUserCount
Approximate count of how many unique users have received an ad impression.
count: Estimated Count, usually accurate to within about 5%. An exact user count is retained for low impression counts.
stdev: Confidence in our estimate.
uncookied: Our Unique User count approach relies on cookies, if no cookie is sent then an uncookied user is recorded
Note: a single user who has registered an impression on two different browsers or devices will be counted as two unique users.