Uploading information about calls

Uploads information about calls.

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).
  • DateTime — Unix timestamp of the date and time of the conversion.

Optional columns:

  • StaticCall — Whether the call was from a static number (1 — static, 0 — dynamic).
  • Price — Goal price (use a dot as the decimal separator).
  • Currency — Currency in three-letter ISO 4217 format.
  • PhoneNumber — Phone number without spaces (including the country and area code). For example: +79451234567.
  • TalkDuration — Duration of the call, in seconds.
  • HoldDuration — How long the call was on hold, in seconds.
  • CallMissed — Whether the call was missed (1 — missed, 0 — answered).
  • Tag — Any tag. You can use it to mark the call quality, result of the call, and so on. For example: "client wasn't happy with price".
  • FirstTimeCaller — First time caller (1 — new caller, 0 — repeat caller).
  • URL — URL the call was tracked from (associated with a page event). For example, this could be a landing page for an ad campaign that shows the phone number (PhoneNumber).
  • CallTrackerURL — URL leading to the call tracker interface.
  1. Request syntax
  2. Request message body
  3. Response format

Request syntax

counterId — ID of the counter that you want to upload information about calls for.

 ? [client_id_type=<offline_conversion_uploading_client_id_type>]
 & [comment=<string>]
 & [new_goal_name=<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.
new_goal_nameThe name of a new target for calls if this target doesn't exist. If it exists, the parameter is ignored.

Request message body

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

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_calls?client_id_type=USER_ID

Response format

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