Reporting API: Statistics

Statistical metrics

All methods for collecting statistics on partner sites and site groups return a set of metrics that include all or several of the following:

  • shows - the number of times the ad was displayed on the site
  • clicks - the number of clicks on the ad on the site
  • requests - the number of requests to the site
  • requested_banners - total number of requested site banners. You can request more than 1 banner in a request.
  • responses - the number of banners fetched in response to requests
  • noshows - the number of requested banners for which no ad was displayed
  • fill_rate - fill rate: ratio of the fetched banners to the total number of requested benners
  • amount - charged sum
  • cpm - average cost per 1 ad on the site
  • ctr - click-through rate; ratio of users who clicked on the ad to the total number of those who viewed it

Collecting statistics on partner sites

GET {host}/api/v2/statistics/partner/pads/day.json
The resource returns per-day statistics for sites and site groups.

Limits and filters are specified as GET request parameters:
Parameter
Format
Description
date_from
YYYY-MM-DD
Start date
date_to
YYYY-MM-DD
End date (included in the report)
id
list of comma-separated identifiers
List of pads or pad_group identifiers. You can specify different ids separating by comma, up to 150 ids.

You can find pad or group_pad id with request https://target.my.com/api/v2/group_pads.json or in the browser address bar. For example:

  • https://target.my.com/pads/13200/ – pad id 13200
  • https://target.my.com/group_pads/4700 – group_pad 4700
All parameters are required.

You can request statistics for no more than 92 days and no more than 200 objects in one query.

Response structure:

  • items - statistics array for the specified period
    • id - object identifier. One request may include statistics for one or more site or site group.
    • rows - statistics array for each date
    • total - overall statistics on an object for the specified period
  • total - overall statistics on all objects for the specified period

Request example:
GET https://target.my.com/api/v2/statistics/partner/pads/day.json?id=3359&date_from=2017-09-20&date_to=2017-09-21
Response example:
{
    "items": [{
        "id": 3359,
        "rows": [{
            "date": "2017-09-20",
            "shows": 6412,
            "clicks": 48,
            "goals": 0,
            "custom": 0,
            "requests": 22126,
            "requested_banners": 22126,
            "responses": 19897,
            "noshows": 2229,
            "amount": "107.98",
            "cpm": "16.84",
            "ctr": 0.7485963817841547,
            "fill_rate": 89.92587905631385
        },
        {
            "date": "2017-09-21",
            "shows": 6426,
            "clicks": 47,
            "goals": 1,
            "custom": 0,
            "requests": 21313,
            "requested_banners": 21313,
            "responses": 18859,
            "noshows": 2454,
            "amount": "108.15",
            "cpm": "16.83",
            "ctr": 0.7314036725801432,
            "fill_rate": 88.48590062403228
        }],
        "total": {
            "shows": 12838,
            "clicks": 95,
            "goals": 1,
            "custom": 0,
            "requests": 43439,
            "requested_banners": 43439,
            "responses": 38756,
            "noshows": 4683,
            "amount": "216.14",
            "cpm": "16.84",
            "ctr": 0.7399906527496495,
            "fill_rate": 89.21936508667326
        }
    }],
    "total": {
        "shows": 12838,
        "clicks": 95,
        "goals": 1,
        "custom": 0,
        "requests": 43439,
        "requested_banners": 43439,
        "responses": 38756,
        "noshows": 4683,
        "amount": "216.14",
        "cpm": "16.84",
        "ctr": 0.7399906527496495,
        "fill_rate": 89.21936508667326
    }
}

Collecting statistics on partner site pages

GET {host}/api/v2/statistics/pad_with_sites/day.json
The resource returns per-day statistics for site pages.

Limits and filters are specified as GET request parameters:
Parameter
Format
Description
date_from
YYYY-MM-DD
Start date
date_to
YYYY-MM-DD
End date (included in the report)
pads
list of comma-separated identifiers
List of site identifiers.

You can find pad or group_pad id with request https://target.my.com/api/v2/group_pads.json or in the browser address bar. For example:

  • https://target.my.com/pads/13200/ – pad id 13200
  • https://target.my.com/group_pads/4700 – group_pad 4700
All parameters are required.

Collecting geo-based statistics on partner sites

GET {host}/api/v2/statistics/geo/pads/{hour|day|summary}.json
The method returns partner site statistics arranged by geographical regions and time (per hour, per day, or summary).

Limits and filters are specified as GET request parameters:
Parameter
Format
Description
date_from
YYYY-MM-DD
Start date
date_to
YYYY-MM-DD
End date (included in the report)
id
list of comma-separated identifiers
List of site identifiers.

You can find pad or group_pad id with request https://target.my.com/api/v2/group_pads.json or in the browser address bar. For example:

  • https://target.my.com/pads/13200/ – pad id 13200
  • https://target.my.com/group_pads/4700 – group_pad 4700
level
string
Level of detail. Possible values:
  • country
  • region
Default value is 'country'.
region
region identifier
Region identifier. Returned statistics will be limited to the specified region and its subordinate areas.
The parameters date_from, date_to и id are required.

To see the list of all regions, use the following method: https://target.my.com/api/v2/regions.json.

Response structure:

  • items - statistics array for the specified period
    • id - object identifier
    • rows - statistics array for each date. Includes the histogram array where data is arranged by the geographical regions specified in the geo field.
    • total - overall statistics on an object for the specified period arranged by geographical data
  • total - overall statistics on all objects for the specified period arranged by geographical data

Request example:
GET https://target.my.com/api/v2/statistics/geo/pads/day.json?date_from=2017-10-01&date_to=2017-10-12&id=571843
Response example:
{
    
    "items": [{
        "id": 7695,
        "rows": [{
            "date": "2017-12-20",
            "histogram": [{
                "geo": 188,
                "clicks": 0,
                "shows": 697,
                "goals": 0,
                "noshows": 1,
                "requests": 2390,
                "requested_banners": 2390,
                "responsed_blocks": 2389,
                "responsed_banners": 2389,
                "amount": "4.08"
            },
            ...
            {
                "geo": 191,
                "clicks": 0,
                "shows": 5,
                "goals": 0,
                "noshows": 50,
                "requests": 58,
                "requested_banners": 58,
                "responsed_blocks": 10,
                "responsed_banners": 10,
                "amount": "0"
            }]
        },
        {
            "date": "2017-12-21",
            "histogram": [{
                "geo": 188,
                "clicks": 0,
                "shows": 520,
                "goals": 0,
                "noshows": 1,
                "requests": 1888,
                "requested_banners": 1888,
                "responsed_blocks": 1887,
                "responsed_banners": 1887,
                "amount": "2.57"
            },
            ...
            {
                "geo": 191,
                "clicks": 0,
                "shows": 6,
                "goals": 0,
                "noshows": 64,
                "requests": 88,
                "requested_banners": 88,
                "responsed_blocks": 25,
                "responsed_banners": 25,
                "amount": "0"
            }]
        }],
        "total": {
            "histogram": [{
                "geo": 188,
                "clicks": 0,
                "shows": 1217,
                "goals": 0,
                "noshows": 2,
                "requests": 4278,
                "requested_banners": 4278,
                "responsed_blocks": 4276,
                "responsed_banners": 4276,
                "amount": "6.65"
            },
            ...
            {
                "geo": 191,
                "clicks": 0,
                "shows": 11,
                "goals": 0,
                "noshows": 114,
                "requests": 146,
                "requested_banners": 146,
                "responsed_blocks": 35,
                "responsed_banners": 35,
                "amount": "0"
            }]
        }
    }],
    "total": {
        "histogram": [{
            "geo": 188,
            "clicks": 0,
            "shows": 1217,
            "goals": 0,
            "noshows": 2,
            "requests": 4278,
            "requested_banners": 4278,
            "responsed_blocks": 4276,
            "responsed_banners": 4276,
            "amount": "6.65"
        },
        ...
        {
            "geo": 191,
            "clicks": 0,
            "shows": 11,
            "goals": 0,
            "noshows": 114,
            "requests": 146,
            "requested_banners": 146,
            "responsed_blocks": 35,
            "responsed_banners": 35,
            "amount": "0"
        }]
    }
}
Was this article helpful?
Да
Нет