Skip to main content
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 GroupDescription
AimpressionsNumber of times product is shown in a banner
BclicksNumber of clicks on product
CcostAmount spent for clicks on products
DsaleUnitsNumber of products sold attributed to clicks
ErevenueRevenue generated by sales
FCR = Conversion RatesalesUnits / clicks
GCPO = Cost Per Ordercost / salesUnits
HCOS = Cost of Salecost / revenue
IROAS = Return On Add Spendrevenue / 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 seller’s 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:

Parameter

Definition

Type

Required?

advertiserId

Show only metrics for this advertiser.

integer

No

clickAttributionPolicy

Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS

string(enum:Both,SameSeller,AnySeller)

No

count

Return up to the first count rows of data (default is all rows).

integer

No

endDate

Filter out all events that occur after date (default is today’s date).

string(date-time)

No

intervalSize

Specify the aggregation interval for events used to compute stats (default is “day”).

string(enum:Hour,Day,Month, `Year) | No

sellerId

Show only metrics for this seller (default all sellers).

string` | No

startDate

Filter out all events that occur before date (default is the value ofendDate).

string(date-time)

No

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.
The default interval size is day. If the interval size is hour, 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 ofendDate)

endDate

YYYY-MM-DD

Filter out all events that occur after date (default is today’s date)

If the end date is left off, 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:
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 is hour, 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.
The default is to report all rows.

Seller Stats

Get performance statistics aggregated for sellers.

Parameter

Definition

Type

Required?

advertiserId

Show only metrics for this advertiser.

integer

No

clickAttributionPolicy

Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS

string(enum:Both,SameSeller,AnySeller)

No

count

Return up to the first count rows of data (default is all rows).

integer

No

endDate

Filter out all events that occur after date (default is today’s date).

string(date-time)

No

intervalSize

Specify the aggregation interval for events used to compute stats (default is “day”).

string(enum: Hour, Day, Month, Year)

No

sellerId

Show only metrics for this seller (default all sellers).

string

No

startDate

Filter out all events that occur before date (default is the value ofendDate).

string(date-time)

No

Sample response
JSON
{
    "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

Definition

Type

Required?

advertiserId

Show only metrics for this advertiser.

integer

No

campaignId

Show only metrics for this campaign (default all campaigns).

string

No

clickAttributionPolicy

Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS

string(enum:Both,SameSeller,AnySeller)

No

count

Return up to the first count rows of data (default is all rows).

integer

No

endDate

Filter out all events that occur after date (default is today’s date).

string(date-time)

No

intervalSize

Specify the aggregation interval for events used to compute stats (default is “day”).

string(enum:Hour,Day,Month,Year)

No

startDate

Filter out all events that occur before date (default is the value ofendDate).

string(date-time)

No

Sample response
JSON
{
   "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

Definition

Type

Required?

advertiserId

Show only metrics for this advertiser.

integer

No

campaignId

Show only metrics for this campaign (default all campaigns).

string

No

clickAttributionPolicy

Specify the click attribution policy for salesUnits, revenue, CR, CPO, COS, and ROAS

string(enum:Both,SameSeller,AnySeller)

No

count

Return up to the first count rows of data (default is all rows).

integer

No

endDate

Filter out all events that occur after date (default is today’s date).

string(date-time)

No

intervalSize

Specify the aggregation interval for events used to compute stats (default is “day”).

string(enum: Hour, Day, Month, Year)

No

sellerId

Show only metrics for this seller (default all sellers).

string

No

startDate

Filter out all events that occur before date (default is the value ofendDate).

string(date-time)

No

Sample response
JSON
{
    "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 campaignId, sellerId, and sellerName appear in the first three columns of the output. These are followed by the interval size column. The remaining columns are metrics.

What’s next