Transmitting and processing data
You can transmit information using:
- The Yandex Metrica web interface.
- The Yandex Metrica API. Data import guide
- Albato automation service. Setup instructions
To configure the transfer of offline conversions in the Yandex Metrica web interface:
-
Prepare special identifiers.
-
On the Goals page, create a JavaScript event goal in the left menu. For the goal ID, specify the event you want to track (for example, order confirmation — "order_confirmed"). You will need this ID when creating a CSV file.
Note
When creating a “JavaScript event” goal, make sure to use the “matches” condition.
If you want to analyze offline conversions separately from conversions on the website, enter a more specific description in Name (for instance, “Purchase in office”, “Offline goal”, or “Cash payment”). This will make it easier to find the goal in the list.
-
Create a CSV file with conversion data, following the recommendations.
-
Upload the file to Yandex Metrica.
Note
The data will appear in Yandex Metrica reports within 2 hours of uploading.
Preparing the CSV file
Specification for the CSV format
Field name |
Required |
Description |
Example |
ClientID | UserID | yclid | PurchaseId |
Yes* |
ID of the website user or ad campaign in Yandex Direct |
12345 |
|
Yes |
Goal ID specified during goal creation |
order_confirmed |
|
Yes |
Conversion time in Unix Time Stamp seconds. When converting event date and time to this format, make sure to account for the tag’s time zone. |
1481718166 |
|
No |
1000 |
|
|
No |
Three-letter ISO 4217 currency code. If a different currency is passed, null values are sent instead of currencies and amounts. |
RUB |
* At least one identifier is required.
The fields support a hierarchical data structure.
Uploading the file
To upload the prepared file with the data, go to the Settings page (the Upload data tab). In the Upload offline conversions, follow these steps:
- Click Upload data.
- In the window that opens, select the linking type depending on the type of the ID you want to upload.
- Select the file on your computer and add comments to the upload, if necessary.
- Click Upload data.
Sample CSV file for uploading data
Note
Your uploaded CSV file should be no larger than 1 GB and use UTF-8 encoding.
File upload errors
Sometimes Yandex Metrica can't match offline conversions to their respective sessions. The most common causes of matching errors are described below:
Reason for error |
Solution |
The goal identifiers specified in the file were not found in Yandex Metrica |
Make sure that the file contains the same goal identifiers as shown in Yandex Metrica. To check the goal ID, open the Goals tab from the left menu. |
The user IDs specified in the file aren't found in Yandex Metrica |
Make sure the way to transmit the IDs is set up correctly. If you are using UserID and the data transfer is configured correctly, try uploading the file later. Most likely, some of the customers with a UserID specified in the file haven't visited the website yet, so the system hasn't had a chance to link their UserID from your database to their internal СlientID in Yandex Metrica. |
Session dates do not fall within the period of adding offline data to sessions. This means that more than 21 days have passed between the date of the user’s last session on the site and the start of file processing. |
In this case, you won't be able to add offline conversions to Yandex Metrica. |
Useful links |
Online training |
* At least one identifier is required.