Transmitting and processing data
- The Yandex Metrica web interface.
- The Yandex Metrica API. Data import guide
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 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.Attention. In the file, specify data that relates to conversions that occurred after enabling Recording offline conversions.
- Upload the file to Yandex Metrica.
Before uploading a file, wait for the amount of time that usually passes between a user's session on the site and an offline conversion. For example, if your website allows up to 10 days to pay for an order at a pick-up point, don't upload data sooner than 10 days after enabling the tracking of offline conversions. This is necessary because the conversion tracking period increases gradually to 21 days from the moment the option is enabled.
Preparing the CSV file
Specification for the CSV format
Field name | Required | Description | Example |
---|---|---|---|
ClientID | UserID | yclid | Yes | ID of the website user or ad campaign in Yandex Direct | 12345 |
Target | Yes | Goal ID specified during goal creation | order_confirmed |
DateTime | Yes | Conversion time in Unix Time Stamp seconds. When converting time to this format, make sure to account for the event's time zone. | 1481718166 |
Price | No | Revenue by goal. | 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 ad campaign in Yandex Direct | 12345 |
Target | Yes | Goal ID specified during goal creation | order_confirmed |
DateTime | Yes | Conversion time in Unix Time Stamp seconds. When converting time to this format, make sure to account for the event's time zone. | 1481718166 |
Price | No | Revenue by goal. | 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.
Sample CSV file for uploading data
The conversions sent in the file are linked to sessions for 21 days after you enable Recording offline conversions. This may increase the number of linked rows.
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 IDs 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 ID on the Goals tab in the left menu. |
The user 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 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 don't fall within the conversion tracking period. This can mean one of the following:
| In this case, you won't be able to add offline conversions to Yandex Metrica. More about tracking conversions |
Reason for error | Solution |
---|---|
The goal IDs 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 ID on the Goals tab in the left menu. |
The user 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 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 don't fall within the conversion tracking period. This can mean one of the following:
| In this case, you won't be able to add offline conversions to Yandex Metrica. More about tracking conversions |