Tracking conversions

Using the Yandex.Metrica API, you can track conversions of user actions on a site and supplement the data with offline conversions (for example, with information about calls).

  1. Goals
  2. Offline conversions and calls
    1. What is required for transmitting data
    2. How to transmit data


API methods help you create and manage various types of goals and use these goals to create reports. For example, you can use a JavaScript event type goal to track “Submit” button clicks and get data on this goal conversion by adding it to the report.

Task API method
Create a goal POST /management/v1/counter/{counterId}/goals
Edit a goal PUT /management/v1/counter/{counterId}/goal/{goalId}
Delete a goal DELETE /management/v1/counter/{counterId}/goal/{goalId}
Get information about available goals GET /management/v1/counter/{counterId}/goals
Get information about a specific goal GET /management/v1/counter/{counterId}/goal/{goalId}
Task API method
Create a goal POST /management/v1/counter/{counterId}/goals
Edit a goal PUT /management/v1/counter/{counterId}/goal/{goalId}
Delete a goal DELETE /management/v1/counter/{counterId}/goal/{goalId}
Get information about available goals GET /management/v1/counter/{counterId}/goals
Get information about a specific goal GET /management/v1/counter/{counterId}/goal/{goalId}

Examples of creating goal reports:

Number of users and conversion rate for a specified goal

Conversion rate for multiple goals

Offline conversions and calls

When a user visits your site, Yandex.Metrica collects information about the user's characteristics, behavior on the site, goals completed, and so on. But your business might have other important information that it collects offline about payments, calls, and so on. You can transmit this data to Yandex.Metrica and link the behavior of your customers on the site to their actions offline.

Transmitting offline data can help you to:

  • Connect users' online and offline history to get a better view of the conversion funnel.
  • Use offline data for advertising: create segments for advertising in Yandex.Direct, including targeting new users with look-alike technology available in the Yandex.Audience service.

You can transmit the following types of offline data:

  • Offline conversions. For example, information about orders that were created on the site and paid for in the office. This data can be transmitted by the site owner in the Yandex.Metrica web interface or using the API.

  • Information about calls. This information is usually available from the call tracking service your company uses. It transmits data to Yandex.Metrica using the API.

Data is sent in a CSV file.

What is required for transmitting data

To link offline data to site users and their sessions, Yandex.Metrica uses the following:
Tracking offline conversions and calls

The option specifies the time interval during which session data can be supplemented with the conversion or call data that you send to Yandex.Metrica.

In some cases, there's a long gap between a click-through to your site and a conversion. For example, if the conversion action is performed offline. Therefore, the conversion tracking period is 21 days. This means that conversion data is added to the visit if the amount of time between the user's last site visit and when the file is processed is 21 days or less.

Offline conversions and calls are only added to sessions that take place after the option is enabled. The time interval for changing session information increases incrementally. The day after enabling this option, the interval is one day, and it keeps getting longer until it reaches the maximum of 21 days.

Note. The option is enabled automatically the first time you send offline data. This doesn't immediately link the transmitted data to the session or make it displayed in Yandex.Metrica reports. Therefore, make sure you enable this option before sending data for the first time.

A conversion isn't linked to a session if:

  • The conversion happened later or you didn't send relevant data within 21 days of the site session date.
  • This option is disabled.

When using different IDs, the conversion attribution methods differ:

  • ClientID and UserID. Offline conversions and calls are added to the user session that directly preceded them. For example, the user had three sessions: March 1, March 5, and March 11. On March 10, this user paid for an order at a retail store, and this date was registered in the CRM. On March 20, the manager sent the data to Yandex.Metrica. The order paid for on March 10 was added to the customer's site session from March 5.
  • yclid. Conversions are added to the session that originated from an ad linked to the transmitted yclid.

Special identifiers

The ID of a unique site user that Yandex.Metrica creates automatically.

It's used for tracking offline conversions and calls and sending user parameters.

Transmit data using ClientID, for example, if your site doesn't have a system of user identifiers or you don't need the identifiers that are used.

In this case, you should:
  1. Get the IDs using the getClientID JavaScript API method.
  2. Send them with the other data in the CSV file.

How to transmit data

For information about how to transmit data, see the following sections:

Transmitting data on offline conversions

Transmitting call data