Getting statistics
The statistical endpoints allows you to review the performance of your campaigns and pass on seller specific statistics to your sellers.
Metrics
The metrics reported by the endpoints are:
Metric Group | Description | |
---|---|---|
A | impressions | Number of times product is shown in a banner |
B | clicks | Number of clicks on product |
C | cost | Amount spent for clicks on products |
D | saleUnits | Number of products sold attributed to clicks |
E | revenue | Revenue generated by sales |
F | CR = Conversion Rate | salesUnits / clicks |
G | CPO = Cost Per Order | cost / salesUnits |
H | COS = Cost of Sale | cost / revenue |
I | ROAS = Return On Add Spend | revenue / cost |
The last six metrics can be computed in two ways depending on the policy to count only the sales that result from clicks on the same sellers product in a banner (same-seller) or not (any-seller). Reporting can be controlled by clickAttributionPolicy.
Aggregation Interval Size
The duration of the aggregation interval for the fundamental events is controlled by the filter parameter intervalSize. (Consider also the name frequency.) The valid values for this parameter are:
Query Parameter | Options | Meaning |
---|---|---|
intervalSize | Year | Aggregate all events that occur in the same year |
Month | Aggregate all events that occur in the same month | |
Day | Aggregate all events that occur in the same day (default) | |
Hour | Aggregate all events that occur in the same hour |
For example, the following request fetches aggregated seller statistics for the current day with a granularity of one row per hour. Every seller managed by this advertiser will have up to 24 rows in the response.
https://api.criteo.com/legacy/offsite-ads/stats/sellers?intervalSize=hour
The default interval size is
day
. If the interval size ishour
, then the maximum date range allowed is one month.
Date Filtering
Filtering the results to events that happened in a temporal interval is done by setting the date filter parameters. These are startDate
and the endDate
. The start date includes all events timestamped since the beginning of that day while the end date includes events until the end of day.
Query Parameter | Format | Meaning |
---|---|---|
startDate | YYYY-MM-DD | Filter out all events that occur before date (default is the value of endDate ) |
endDate | YYYY-MM-DD | Filter out all events that occur after date (default is today’s date) |
If the end date is left of it defaults to today. If the start date is left off it defaults to the end date. As a result, the default query returns one day of stats. Using just the end date returns a single day as well:
https://api.criteo.com/legacy/offsite-ads/stats/sellers?endDate=2019-01-01
There are a few constraints. The start date must not be in the future and must be on or precede the end date. The format to use for each is
YYY-MM-DD
(e.g.2018-04-30
). The maximum duration of the date range is 1 year. If the granularity ishour
, then the maximum duration of the date range is 1 month. Note that month and year aggregate values may contain partial data if filtered by date.
Count Filtering
Filtering the results to a maximum number of data rows is done by setting the count filter parameter. When combined with startDate
this can be used to perform simple pagination. For example the first page can have a count of 100; the second page can start on the day after the last date in the first result and still have a count of 100 and so on.
Query Parameter | Options | Meaning |
---|---|---|
count | Int > 0 | Return up to the first count rows of data (default is to return all rows available). |
The following query will return up to 100 rows of data.
https://api.criteo.com/legacy/offsite-ads/stats/sellers?count=100
The default is to report all rows.
Seller Stats
Get performance statistics aggregated for sellers.
Parameter | Value | Meaning | Default |
---|---|---|---|
intervalSize | Hour, Day, Month, Year | Specify the aggregation interval for events used to compute stats | Day |
clickAttributionPolicy | Both, SameSeller, AnySeller | Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS | AnySeller |
startDate | Date time (YYYY-MM-DD) | Filter out all events that occur before date | default is the value of endDate |
endDate | Date time (YYYY-MM-DD) | Filter out all events that occur after date | default is today’s date |
sellerId | Integer | Show only metrics for this Seller | default all Sellers |
count | Integer | Return up to the first count rows of data | default is all rows |
https://api.criteo.com/legacy/offsite-ads/stats/sellers?intervalSize=Month
{
"columns": ["sellerId", "sellerName", "month", "impressions", "clicks", "cost", "saleUnits", "revenue", "cr", "cpo", "cos", "roas"],
"data": [
[1200972, "sellerA", "2019-05-01", 14542, 48, 3.36, 0, 0.0, 0.0, null, null, 0.0],
[1200972, "sellerA", "2019-06-01", 16619, 53, 3.71, 0, 0.0, 0.0, null, null, 0.0],
[1200974, "sellerB", "2019-05-01", 10102, 47, 3.29, 3, 396000.0, 0.063, 1.096, 8.308E-6, 120364.741],
[1200974, "sellerB", "2019-06-01", 11576, 54, 3.78, 1, 132000.0, 0.018, 3.78, 2.863E-5, 34920.634]
],
"rows": 4
}
The seller id appears in the output in the first column and the seller name appears in the second. The time interval appears in the output as the third column. The remaining columns are metrics.
Campaign Stats
Get performance statistics aggregated for campaigns.
Parameter | Value | Meaning | Default |
---|---|---|---|
intervalSize | Hour, Day, Month, Year | Specify the aggregation interval for events used to compute stats | Day |
clickAttributionPolicy | Both, SameSeller, AnySeller | Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS | AnySeller |
startDate | Date time (YYYY-MM-DD) | Filter out all events that occur before date | default is the value of endDate |
endDate | Date time (YYYY-MM-DD) | Filter out all events that occur after date | default is today’s date |
sellerId | Integer | Show only metrics for this campaign | default all campaigns |
count | Integer | Return up to the first count rows of data | default is all rows |
https://api.criteo.com/legacy/offsite-ads/stats/campaigns?intervalSize=Month
{
"columns": [ "campaignId", "month", "impressions", "clicks", "cost", "saleUnits", "revenue", "cr", "cpo", "cos", "roas" ],
"data": [
[168423, "2019-05-01", 3969032, 13410, 1111.295, 985, 190758099, 0.073, 1.128, 0.000, 171653.880 ],
[168423, "2019-06-01", 8479603, 25619, 2190.705, 740, 152783656, 0.028, 2.960, 0.000, 69741.775 ]
],
"rows": 2
}
The campaign id appears in the output as the first column. The time interval appears in the output as the second column. The remaining columns are metrics.
Seller Campaign Stats
Get performance statistics aggregated for seller campaigns.
Parameter | Value | Meaning | Default |
---|---|---|---|
intervalSize | Hour, Day, Month, Year | Specify the aggregation interval for events used to compute stats | Day |
clickAttributionPolicy | Both, SameSeller, AnySeller | Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS | AnySeller |
startDate | Date time (YYYY-MM-DD) | Filter out all events that occur before date | default is the value of endDate |
endDate | Date time (YYYY-MM-DD) | Filter out all events that occur after date | default is today’s date |
sellerId | Integer | Show only metrics for this campaign | default all campaigns |
count | Integer | Return up to the first count rows of data | default is all rows |
https://api.criteo.com/legacy/offsite-ads/stats/seller-campaigns?intervalSize=Month
{
"columns": [
"campaignId", "sellerId", "sellerName", "month", "impressions", "clicks", "cost", "saleUnits", "revenue", "cr", "cpo", "cos", "roas"
],
"data": [
[168423, 1110222, "118883955", "2019-05-01", 14542, 48, 3.36, 0, 0.0, 0.0, null, null, 0.0],
[168423, 1110222, "118883955", "2019-06-01", 16619, 53, 3.71, 0, 0.0, 0.0, null, null, 0.0],
[168423, 1110225, "117980027", "2019-05-01", 12502, 48, 3.36, 0, 0.0, 0.0, null, null, 0.0],
[168423, 1110225, "117980027", "2019-06-01", 20266, 53, 3.71, 0, 0.0, 0.0, null, null, 0.0]
],
"rows": 4
}
The campaign id, seller id, and seller name appear in the first three columns of the output. These are followed by the interval size column. The remaining columns are metrics.
Updated almost 3 years ago