Uploading offline conversions

Uploads offline conversions.

Data is passed as multipart/form-data in CSV format. The first line of the request must pass the column names.

Required columns:

  • UserId — The site user ID assigned by the site owner (only for client_id_type = USER_ID).
  • ClientId — The site visitor ID assigned by Yandex.Metric (only for client_id_type = CLIENT_ID).
  • Yclid — The ID of a click on a Yandex.Direct ad assigned by Yandex.Direct (only for client_id_type = YCLID).
  • Target — Goal ID.
  • DateTime — Date and time of conversion in unix timestamp.

Optional columns:

  • Price — The cost of the goal, using a dot (.) as the decimal separator.
  • Currency — The currency using the three-letter code from the ISO 4217 standard.
  1. Request syntax
  2. Request message body
  3. Response format

Request syntax

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

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

Allowed values:

  • USER_ID — Site user ID assigned by site owner.
  • CLIENT_ID — Site user ID assigned by Yandex.Metrica.
  • YCLID — The ID of a click on a Yandex.Direct ad assigned by Yandex.Direct.

Request message body

POST http://api-metrika.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.