Uploading offline conversions


Access tokens will not be accepted in URL parameters starting February 13, 2019. To continue working with the Yandex.Metrica API, set up authorization by passing the token in the HTTP header.

The outdated authorization method will be temporarily disabled on January 23, January 30, and February 6 for maintenance. Authorization using URL parameters will be unavailable on these dates.

Uploads information about offline conversions.

Transmit data as multipart/form-data in CSV format, with the first row containing the column headers.

Required columns:

  • UserId — Site user ID assigned by the site owner (only for client_id_type = USER_ID)
  • ClientId — Site user ID assigned by Yandex.Metrica (only for client_id_type = CLIENT_ID)
  • Target — Target ID.
  • DateTime — Unix timestamp of the date and time of the conversion.

Optional columns:

  • Price — Goal price (use a dot as the decimal separator).
  • Currency — Currency in three-letter ISO 4217 format.
  1. Request syntax
  2. Request message body
  3. Response format

Request syntax

counterId — ID of the counter that you want to upload offline conversions for.

 ? [client_id_type=<offline_conversion_uploading_client_id_type>]
 & [comment=<string>]
Query parameters
client_id_typeType of user identifiers.

Allowed values:

  • CLIENT_ID — Site user ID assigned by Yandex.Metrica.
  • USER_ID — Site user ID assigned by site owner.

Request message body

POST https://api-metrica.yandex.net/management/v1/counter/{counterId}/offline_conversions/upload?client_id_type=CLIENT_ID
Content-Type: multipart/form-data; boundary=------------------------7zDUQOAIAE9hEWoV
Context-Length: 253

Content-Disposition: form-data; name="file"; filename="data.csv"
Content-Type: text/csv


Request example

POST https://api-metrica.yandex.net/management/v1/counter/{counterId}/offline_conversions/upload?client_id_type=USER_ID

Response format

    "uploading" :  < uploading > 
Parameters Description
uploading Information about the upload of offline conversions.