Transmitting and processing data
You can transmit information via the Yandex.Metrica API or the web interface. More information about transmitting data via the API
The following section describes how to transmit data via the web interface.
- Prepare special identifiers.
-
On the JavaScript event goal. For the goal ID, specify an event that is important to track (for example, confirming an order: “order_confirmed”). You will need this ID when creating a CSV file.
page, create aIf 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.
-
On the Upload data tab, go to the Upload offline conversions section and enable Extended conversion window.
Note. Before uploading a file, wait for the amount of time that usually passes between users' actions on the website and offline. For example, if your website allows up to 10 days to pay for an order at the pick-up point, don't upload data sooner than 10 days after enabling the extended conversion window. This will allow you to collect the most complete data about offline conversions in Yandex.Metrica. - Create a CSV file with conversion data, following the recommendations.
- Upload the file to Yandex.Metrica.
Preparing the CSV file
Specification for the CSV format
Field name | Required | Description | Example |
---|---|---|---|
ClientID | UserID | yclid | Yes | ID of the website user or advertising campaign in Yandex.Direct | 12345 |
Target | Yes | The goal identifier that was set when creating the goal in the web interface | order_confirmed |
DateTime | Yes | The time of the conversion (in Unix Time Stamp format) | 1481718166 |
Price | No | Goal value | 1000 |
Currency | No | Three-letter ISO 4217 currency code. If a different currency is passed, null values will be sent instead of currencies and amounts. | RUB |
Field name | Required | Description | Example |
---|---|---|---|
ClientID | UserID | yclid | Yes | ID of the website user or advertising campaign in Yandex.Direct | 12345 |
Target | Yes | The goal identifier that was set when creating the goal in the web interface | order_confirmed |
DateTime | Yes | The time of the conversion (in Unix Time Stamp format) | 1481718166 |
Price | No | Goal value | 1000 |
Currency | No | Three-letter ISO 4217 currency code. If a different currency is passed, null values will be sent instead of currencies and amounts. | RUB |
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.
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. You can check the goal identifier on the Goals tab in the tag settings. |
The IDs specified in the file were not 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 the UserIDs specified in the file haven't visited the website yet, so the system hasn't had a chance to link their UserIDs from your database to their internal СlientIDs in Yandex.Metrica. |
Session dates do not fall within the 21-day conversion tracking period. This means that more than 21 days passed between the date of the user's last session on the website and the time when the file was processed, or the date of the last session preceding the conversion is earlier than the date when the extended tracking period started. | In this case, you won't be able to add offline conversions to Yandex.Metrica. Learn more about the extended conversion tracking period |
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. You can check the goal identifier on the Goals tab in the tag settings. |
The IDs specified in the file were not 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 the UserIDs specified in the file haven't visited the website yet, so the system hasn't had a chance to link their UserIDs from your database to their internal СlientIDs in Yandex.Metrica. |
Session dates do not fall within the 21-day conversion tracking period. This means that more than 21 days passed between the date of the user's last session on the website and the time when the file was processed, or the date of the last session preceding the conversion is earlier than the date when the extended tracking period started. | In this case, you won't be able to add offline conversions to Yandex.Metrica. Learn more about the extended conversion tracking period |