GetSummaryStat (Live)

Returns statistics for the specified campaigns for each day of the specified period.

Attention.

Disabled method. Use version 5 of the API.

For information about the compatibility of methods between versions Live 4 and 5, see the Migration guide.

Restrictions

Up to 100 method calls per day for a single campaign.

The number of requested campaigns multiplied by the number of days in the selected period must not exceed 1000.

Statistics are available for the three years prior to the current month. For example: on September 15, 2016, you can get data starting from September 1, 2013.

All campaigns specified in the same method call must be in the same currency.

New in the Live 4 version

The Currency input parameter is required for campaigns that use a real currency.

Added the input parameters Currency, IncludeVAT, and IncludeDiscount.

Input data

The input data structure in JSON is shown below.

{
   "method": "GetSummaryStat",
   "param": {
      /* GetSummaryStatRequest */
      "CampaignIDS": [
         (int)
         ...
      ],
      "StartDate": (date),
      "EndDate": (date),
      "Currency": (string),
      "IncludeVAT": (string),
      "IncludeDiscount": (string)
   }
}

Parameters are described below.

Parameter Description Required
GetSummaryStatRequest object
CampaignIDS

Array containing campaign IDs.

Attention. The number of campaigns multiplied by the number of days in the report period must not exceed 1000.
Yes
StartDate The start date of the report period that statistics are being returned for (YYYY-MM-DD). Yes
EndDate The end date of the report period that statistics are being returned for (YYYY-MM-DD). Yes
Currency

The currency to use for amounts in the response.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign currency; otherwise, an error is returned with code 245.

For campaigns in units, either omit the parameter or pass NULL.

For campaigns in a real currency
IncludeVAT

Calculate VAT for the cost of clicks in a currency — Yes/No. When the value is Yes, amounts shown in the response will include VAT. If omitted, Yes is assumed.

If the Currency parameter is omitted, the IncludeVAT parameter is ignored.

No
IncludeDiscount

Calculate the discount for the cost of clicks in a currency — Yes/No.

When the value is Yes, the report will show amounts that include the discount (in other words, the amounts that are actually deducted from the campaign balance). When the value is No, the report will show amounts before the discount is applied. If omitted, Yes is assumed.

Note. For campaigns that operate in a currency, the discount is applied when the cost per click is deducted.

If the Currency parameter is omitted, the "No" value is assumed.

No
Parameter Description Required
GetSummaryStatRequest object
CampaignIDS

Array containing campaign IDs.

Attention. The number of campaigns multiplied by the number of days in the report period must not exceed 1000.
Yes
StartDate The start date of the report period that statistics are being returned for (YYYY-MM-DD). Yes
EndDate The end date of the report period that statistics are being returned for (YYYY-MM-DD). Yes
Currency

The currency to use for amounts in the response.

Acceptable values: RUB, CHF, EUR, KZT, TRY, UAH, USD, BYN. The value must match the campaign currency; otherwise, an error is returned with code 245.

For campaigns in units, either omit the parameter or pass NULL.

For campaigns in a real currency
IncludeVAT

Calculate VAT for the cost of clicks in a currency — Yes/No. When the value is Yes, amounts shown in the response will include VAT. If omitted, Yes is assumed.

If the Currency parameter is omitted, the IncludeVAT parameter is ignored.

No
IncludeDiscount

Calculate the discount for the cost of clicks in a currency — Yes/No.

When the value is Yes, the report will show amounts that include the discount (in other words, the amounts that are actually deducted from the campaign balance). When the value is No, the report will show amounts before the discount is applied. If omitted, Yes is assumed.

Note. For campaigns that operate in a currency, the discount is applied when the cost per click is deducted.

If the Currency parameter is omitted, the "No" value is assumed.

No

Output data

The method returns an array of StatItem objects. Each object contains statistics for a single campaign for a single date in the selected period.

Attention. If the requested campaign did not have any impressions for the entire period, information about the campaign is not output in the response.

Part of the returned parameters are based on Yandex Metrica data (see the Help section Yandex Metrica: advertising campaign efficiency evaluation in the Help for Yandex Direct).

{
   "data": [
      {  /* StatItem */
         "CampaignID": (int),
         "StatDate": (date),
         "SumSearch": (float),
         "SumContext": (float),
         "ShowsSearch": (int),
         "ShowsContext": (int),
         "ClicksSearch": (int),
         "ClicksContext": (int),
         "SessionDepthSearch": (float),
         "SessionDepthContext": (float),
         "GoalConversionSearch": (float),
         "GoalConversionContext": (float),
         "GoalCostSearch": (float),
         "GoalCostContext": (float)
      }
      ...
   ]
}

Parameters are described below.

Parameter Description
StatItem object
CampaignID The campaign ID.
StatDate The data statistics are provided for.
SumSearch

The total cost of clicks on search (in the currency specified in the Currency input parameter).

See Notes below.

SumContext

The total cost of clicks in the Yandex Advertising Network (in the currency specified in the Currency input parameter).

See Notes below.

ShowsSearch Number of impressions in the search.
ShowsContext Number of impressions in the Yandex Advertising Network.
ClicksSearch Number of clicks in the search.
ClicksContext Number of clicks in the Yandex Advertising Network.
SessionDepthSearch

Session depth for a site when clicking through from the search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.

SessionDepthContext

Session depth for a site when clicking through from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.

GoalConversionSearch

The percentage of goal visits as part of the total number of visits when transferring from Search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.

GoalConversionContext

The percentage of goal visits as part of the total number of visits when transferring from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.

GoalCostSearch

Cost of achieving a Yandex Metrica goal for click-throughs from the search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.

GoalCostContext

Cost of achieving a Yandex Metrica goal for click-throughs from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.

Notes
  1. The cost of clicks that is expressed in a currency may include or exclude VAT, depending on the value of the IncludeVAT input parameter.

    Cost of clicks with VAT = Cost of clicks without VAT × (1 + VAT rate)

  2. The cost of clicks that is expressed in a currency may or may not include the discount, depending on the value of the IncludeDiscount input parameter.

    Cost of clicks before applying the discount = Cost of clicks actually deducted from the balance / (1 – Discount)

    Note. For campaigns that operate in a currency, the discount is applied when the cost per click is deducted.
  3. If the campaign was run in Yandex units, the amounts are returned “as is”, without any other conversions.
Parameter Description
StatItem object
CampaignID The campaign ID.
StatDate The data statistics are provided for.
SumSearch

The total cost of clicks on search (in the currency specified in the Currency input parameter).

See Notes below.

SumContext

The total cost of clicks in the Yandex Advertising Network (in the currency specified in the Currency input parameter).

See Notes below.

ShowsSearch Number of impressions in the search.
ShowsContext Number of impressions in the Yandex Advertising Network.
ClicksSearch Number of clicks in the search.
ClicksContext Number of clicks in the Yandex Advertising Network.
SessionDepthSearch

Session depth for a site when clicking through from the search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.

SessionDepthContext

Session depth for a site when clicking through from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.

GoalConversionSearch

The percentage of goal visits as part of the total number of visits when transferring from Search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.

GoalConversionContext

The percentage of goal visits as part of the total number of visits when transferring from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.

GoalCostSearch

Cost of achieving a Yandex Metrica goal for click-throughs from the search.

Taken from Yandex Metrica data, and only if the CPAOptimizer automatic strategy is used on the search.

GoalCostContext

Cost of achieving a Yandex Metrica goal for click-throughs from the Yandex Advertising Network.

Taken from Yandex Metrica data, but only if the CPAOptimizer automatic strategy is used in the Yandex Advertising Network.

Notes
  1. The cost of clicks that is expressed in a currency may include or exclude VAT, depending on the value of the IncludeVAT input parameter.

    Cost of clicks with VAT = Cost of clicks without VAT × (1 + VAT rate)

  2. The cost of clicks that is expressed in a currency may or may not include the discount, depending on the value of the IncludeDiscount input parameter.

    Cost of clicks before applying the discount = Cost of clicks actually deducted from the balance / (1 – Discount)

    Note. For campaigns that operate in a currency, the discount is applied when the cost per click is deducted.
  3. If the campaign was run in Yandex units, the amounts are returned “as is”, without any other conversions.

Examples of input data

Python

{
   'CampaignIDS': [238456],
   'StartDate': '2011-05-14',
   'EndDate': '2011-05-19'
}

PHP

array(
   'CampaignIDS' => array(238456),
   'StartDate' => '2011-05-14',
   'EndDate' => '2011-05-19'
)

Perl

{
   'CampaignIDS' => [238456],
   'StartDate' => '2011-05-14',
   'EndDate' => '2011-05-19'
}