---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/direct/doc/dg-v4/en/examples/StatFileFormat.md
  - https://yandex.ru/dev/direct/doc/dg-v4/ru/examples/StatFileFormat.md
  - href: en/examples/StatFileFormat.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/direct/doc/dg-v4/en/llms.txt

# Example of a campaign statistics report

A sample report in XML format is shown below.

```xml
<?xml version="1.0" encoding="UTF-8" ?>
<report
  <reportID>1234</reportID>
  <campaignID>1234567</campaignID>
  <startDate>2013-05-01</startDate>
  <endDate>2013-05-31</endDate>
  <phrasesDict>
      <phrase type="phrase" phraseID="2" value="refrigeration equipment" />
      <phrase type="retargeting" DictID="912" value="retargeting: order not completed" / 
</phrasesDict>
  <stat>
      <row bannerID="123456"
          phraseID{stat}="2"
          statDate="2013-05-15"
          sum_search="10"
          sum_context="2"
          shows_search="1000"
          shows_context="123"
          clicks_search="100"
          clicks_context="23"
          sum="12"
          shows="1234"
          clicks="123"
          regionID="1"
          placeName="Yandex"
          placeType="search"
          goal_id="18565"
          goal_conversion="25.91"
          goal_cost="1.54"
          session_depth="9.35"
          goal_conversions_num="28" 
           position_type="premium"
          stat_type="Text"
          shows_average_position="4.87"
          clicks_average_position="4.95"/>
      <row bannerID="123457"
          DictID{stat}="912"
          RetargetingID="3097" 
           statDate="2013-05-25"
          sum_search="0"
          sum_context="96.35"
          shows_search="0"
          shows_context="755"
          clicks_search="0"
          clicks_context="57"
          sum="96.35"
          shows="755"
          clicks="57"
          regionID="1"
          placeName="catalog.tut.by"
          placeType="context"
          goal_id="18777"
          goal_conversion="28.88"
          session_depth="9.39"
          position_type="other"
          stat_type="Image"/>
  </stat>
</report>
```

Descriptions of report elements are provided below.


#|
||
**<sup >Element/attribute</sup>**
|
**<sup >Description</sup>**
|
**<sup >Output condition</sup>**
||

||
**<sub >report element</sub>**
||
||
reportID
|
ID of the report.
||
||
campaignID
|
The campaign ID.
||
||
startDate
|
The start date of the report, `YYYY-MM-DD`.
||
||
endDate
|
The end date of the report, `YYYY-MM-DD`.
||
||
phrasesDict
|
Keyword dictionary. Contains information about objects in the report: keywords, Yandex Catalog categories, retargetings, and targeting conditions for dynamic text ads.
||
||
stat
|
Statistical data.
||

||
**<sub >phrasesDict element</sub>**
||
||
phrase
|
Information about the keyword, category, or retargeting in the attributes `type`, `phraseID`, `DictID`, and `value`.
||
||
<xmlatt >type</xmlatt>
|
Contains the value “phrase” in entries about keywords, “rubric” in entries about Yandex Catalog categories, or “retargeting” in entries about retargetings.
||
||
<xmlatt >phraseID</xmlatt>
|
ID of the keyword in the report.

The `phraseID` identifier exists only within the report and does not match the keyword ID in Yandex Direct. It is used for standardizing report data and links the `phrase` and `row` elements.
||
||
<xmlatt >rubricID</xmlatt>
|
ID of the category in the report.

Exists only within the report and does not match the category ID in Yandex Direct. Used for standardizing report data; links the `phrase` and `row` elements.
||
||
<xmlatt >DictID</xmlatt>
|
ID of the [retargeting](https://yandex.ru/dev/direct/doc/dg-v4/en/concepts/retargeting.md#ret-params) in the report.

Exists only within the report and does not match the retargeting ID in Yandex Direct. Used for standardizing report data; links the `phrase` and `row` elements.
||
||
<xmlatt >value</xmlatt>
|
Either the text of the keyword, the number of the Yandex Catalog category, or the retargeting description in the report.
||

||
**stat element**
||
||
row
|
Keyword statistics for one day in the report period.
||
||
<xmlatt >sum</xmlatt>
|
Cost of clicks deducted from the balance of the campaign<sup >1</sup>.
||
||
<xmlatt >shows</xmlatt>
|
Number of impressions<sup >1</sup>.
||
||
<xmlatt >clicks</xmlatt>
|
Number of clicks<sup >1</sup>.
||
||
<xmlatt >bannerID</xmlatt>
|
The ad ID.
|
In the `GroupByColumns` parameter, the value of “clBanner” or “clImage” is specified.
||
||
<xmlatt >phraseID</xmlatt>
|
The keyword ID in the report (see the `phrasesDict` element).

The `phraseID` identifier exists only within the report and does not match the keyword ID in Yandex Direct. It is used for standardizing report data and links the `phrase` and `row` elements.
|
In the `GroupByColumns` parameter, the value “clPhrase” is specified and the entry contains information about the keyword (not about the Yandex Catalog category or retargeting).
||
||
<xmlatt >rubricID</xmlatt>
|
ID of the Yandex Catalog category in the report (see the `phrasesDict` element).

Exists only within the report and does not match the category ID in Yandex Direct. Used for standardizing report data; links the `phrase` and `row` elements.
|
In the `GroupByColumns` parameter, the value “clPhrase” is specified and the entry contains information about the keyword, not about the Yandex Catalog category.
||
||
<xmlatt >DictID</xmlatt>
|
The retargeting ID in the report (see the `phrasesDict` element).

Exists only within the report and does not match the retargeting ID in Yandex Direct. Used for standardizing report data; links the `phrase` and `row` elements.
|
In the `GroupByColumns` parameter, the “clPhrase” value is specified and the entry contains information about retargeting.
||
||
<xmlatt >RetargetingID</xmlatt>
|
Retargeting ID in Yandex Direct.
|
In the `GroupByColumns` parameter, the “clPhrase” value is specified and the entry contains information about retargeting.
||
||
<xmlatt >statDate</xmlatt>
|
The data statistics are provided for. If the [GroupByDate](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByDate) input parameter has the value “week” or “month”, the first date of the week or month is specified.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the value “clDate” is present.
||
||
<xmlatt >sum_search</xmlatt>
|
Cost of clicks in the search.
|
The [PageType](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportFilterInfo-PageType) input parameter is omitted or has the value “all”.
||
||
<xmlatt >sum_context</xmlatt>
|
Cost of clicks in the Yandex Advertising Network.
||
||
<xmlatt >shows_search</xmlatt>
|
Number of impressions in the search.
||
||
<xmlatt >shows_context</xmlatt>
|
Number of impressions in the Yandex Advertising Network.
||
||
<xmlatt >clicks_search</xmlatt>
|
Number of clicks in the search.
||
||
<xmlatt >clicks_context</xmlatt>
|
Number of clicks in the Yandex Advertising Network.
||
||
<xmlatt >regionID</xmlatt>
|
ID of the display region.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the “clGeo” value is present.
||
||
<xmlatt >placeName</xmlatt>
|
Name of the site where the ad is being displayed.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the value “clPage” is present.
||
||
<xmlatt >placeType</xmlatt>
|
Type of display platform: “search” — the search platform (including Yandex search and search sites in the Yandex Advertising Network), or “context” — a site in the Yandex Advertising Network.
||
||
<xmlatt >goal_id</xmlatt>
|
The ID of the [goal](https://yandex.ru/support/metrika/general/goals.xml)[goal](https://yandex.com/support/metrica/general/goals.xml) in Yandex Metrica, if it was passed in the `StatGoals` input parameter.

0 — If the ID was not passed. In this case, the other Yandex Metrica indicators contain aggregated data for all goals.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the value “clStatGoals” is present.
||
||
<xmlatt >goal_conversion</xmlatt>
|
The percentage of goal visits as part of the total number of visits.
||
||
<xmlatt >goal_cost</xmlatt>
|
The average cost of a goal visit: the relationship of revenue to the number of goal visits.
||
||
<xmlatt >session_depth</xmlatt>
|
Session depth for the site.
||
||
<xmlatt >goal_conversions_num</xmlatt>
|
Number of goal visits (conversions).
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the value “clGoalConversionsNum” is present.
||
||
<xmlatt >position_type</xmlatt>
|
The ad display block: “premium” for Premium Placement, or “other” for other ad blocks.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the value “clPositionType” is present.
||
||
<xmlatt >stat_type</xmlatt>
|
Type of ad display: with or without an image. Possible values: Image/Text.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the “clImage” value is present.
||
||
<xmlatt >shows_average_position</xmlatt>
|
Average display position of the ad. Calculated using only displays on the first page of Yandex search results.

The top position is assigned the number 1.
|
In the [GroupByColumns](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportInfo-GroupByColumns) array, the value “clAveragePosition” is present.
||
||
<xmlatt >clicks_average_position</xmlatt>
|
Average position where the ad was clicked. Calculated using only clicks on the first page of Yandex search results.
||

||
**Notes**
||
||
1. The values of the `sum`, `shows` and `clicks` parameters depend on the [PageType](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md#NewReportFilterInfo-PageType) input parameter:
    
    - when the value is “all” or `PageType` is omitted, cumulative data is given for the search and the Yandex Advertising Network. However, data is given separately for the search and the Yandex Advertising Network in the parameters `sum_search`, `shows_search`, `clicks_search`, `sum_context`, `shows_context`, and `clicks_context`.
    - If the value is “search”, data is provided for Yandex search and search sites in the Yandex Advertising Network.
    - If the value is “context”, data is provided for sites in the Yandex Advertising Network, other than search sites.
||
|#

## Related information

- [CreateNewReport](https://yandex.ru/dev/direct/doc/dg-v4/en/reference/CreateNewReport.md)


