Tracking clicks and impressions

Returns data on tracking clicks and impressions for a specific date range.

  1. Request format
  2. Response format
  3. Example

Request format

GET https://api.appmetrica.yandex.ru/logs/v1/export/clicks.{csv | json}
 ? application_id=<int>
 & date_since=<string>
 & date_until=<string>
 & fields=<string>
 & [date_dimension=<string>]
 & [limit=<int>]
 & [use_utf8_bom=<bool>]
 & [<any field name>=<string>]
application_id *

Filtering by the app's numeric ID in AppMetrica

date_since *

Start of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

date_until *

End of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

fields *

A comma-separated list of fields for the sample.

A list that contains all available fields (for quick copy):

application_id,click_datetime,click_id,click_ipv6,click_timestamp,click_url_parameters,click_user_agent,publisher_id,publisher_name,tracker_name,tracking_id,touch_type,city,country_iso_code,device_type,device_model,device_manufacturer,os_version,os_name,windows_aid,google_aid,ios_ifv,ios_ifa
Copied to clipboard
date_dimension
The parameter defines what date and time are used as a condition for getting into the data sample:
  • default — When the event occurred on the device;
  • receive — When the server received event information.
limit

Limit on the number of items in the list. Takes the maximum value by default. There is no guarantee that results will match from request to request (there may be differences in results sorting).

use_utf8_bom

Parameter that enables the use of byte order mark. The default value is false.

<any field name>

Filtering by the value of one of the available fields. Only the equality check operation is supported.

application_id *

Filtering by the app's numeric ID in AppMetrica

date_since *

Start of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

date_until *

End of the date range in the yyyy-mm-dd hh:mm:ss format. You can also define the date and time type that affects the data in the date_dimension query parameter.

fields *

A comma-separated list of fields for the sample.

A list that contains all available fields (for quick copy):

application_id,click_datetime,click_id,click_ipv6,click_timestamp,click_url_parameters,click_user_agent,publisher_id,publisher_name,tracker_name,tracking_id,touch_type,city,country_iso_code,device_type,device_model,device_manufacturer,os_version,os_name,windows_aid,google_aid,ios_ifv,ios_ifa
Copied to clipboard
date_dimension
The parameter defines what date and time are used as a condition for getting into the data sample:
  • default — When the event occurred on the device;
  • receive — When the server received event information.
limit

Limit on the number of items in the list. Takes the maximum value by default. There is no guarantee that results will match from request to request (there may be differences in results sorting).

use_utf8_bom

Parameter that enables the use of byte order mark. The default value is false.

<any field name>

Filtering by the value of one of the available fields. Only the equality check operation is supported.

* Required

Response format

Example

Request:
curl -X GET \
  'https://api.appmetrica.yandex.ru/logs/v1/export/clicks.json?application_id=1111&date_since=2018-10-10&date_until=2018-10-11&fields=application_id,click_datetime,click_id,click_ipv6,click_timestamp,click_url_parameters,click_user_agent,publisher_id,publisher_name,tracker_name,tracking_id,touch_type,city,country_iso_code,device_type,device_model,device_manufacturer,os_version,os_name,windows_aid,google_aid,ios_ifv,ios_ifa' \
  -H 'Authorization: OAuth oauth_token'
Copied to clipboard

Response:

{
  "data": [
    {
      "application_id": "1111",
      "click_datetime": "yyyy-mm-dd hh:mm:ss",
      "click_id": "f2ae4254de8844dda58b29cac2cf0e87",
      "click_ipv6": "::ffff:5.255.232.147",
      "click_timestamp": "1556258660",
      "click_timestamp": "1556258660",
      "click_url_parameters": "click_id=f2ae4254de8844dda58b29cac2cf0e87&c=1234&google_aid=&google_aid_sha1=&google_aid_md5=&ios_ifa=&ios_ifa_sha1=&ios_ifa_md5&click_timestamp=1554824136&afpub_id=&site_id=&creative_id=&goal_id1=&goal_id2 ",
      "click_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1",
      "publisher_id": "39",
      "publisher_name": "AdColony",
      "touch_type": "click",
      "tracker_name": "Аdvertising iOS campaign",
      "tracking_id": "12345678901234567890",
      "city": "Moscow",
      "country_iso_code": "RU",
      "device_type": "phone",
      "device_model": "iPhone X",
      "device_manufacturer": "Apple",
      "os_version": "12.2",
      "os_name": "ios",
      "windows_aid": "",
      "google_aid": "",
      "ios_ifv": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "ios_ifa": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    }
  ]
}
Copied to clipboard