Tracking conversions

With the Yandex Metrica API, you can track user conversions on your site and supplement the data with offline conversions (for example, call information).

  1. Goals
  2. Offline conversions and calls
    1. What you need to pass data
    2. How to pass data

Goals

The API methods help you create and manage goals of various types, as well as use these goals to generate reports. For example, with a JavaScript event goal, you can track user clicks on the “Submit request” button. By adding this button to the report, you can get data on conversions for this goal.

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 conversion 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 website, Yandex Metrica collects information about their characteristics, behavior on the site, and conversions. Your business may have other important information collected offline about payments, calls, and so on. You can pass this data to Yandex Metrica and link user behavior on the site to their actions offline.

Passing offline data can help you to:

  • Connect users' online and offline history to get a better view of the conversion funnel.
  • Advertise your business — you can create segments for advertising in Yandex Direct and target new users with the look-alike technology available in Yandex Audience.

You can transmit the following types of offline data:

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

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

Data is passed in a CSV file.

What you need to pass data

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

This option specifies the time interval during which the data about a conversion or call passed to Yandex Metrica can be added to the session data.

In some cases, there is quite a long delay between the session and the conversion, like if the conversion action is performed offline. This is why the conversion tracking period is 21 days. This means that data about a conversion is added to a session if 21 days or less have passed from the user's last session on the website to processing the file with the conversion data.

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

Note. The option is enabled automatically when you pass offline data for the first time. However, the data you pass won't yet be matched to a user session and won't be displayed in Yandex Metrica reports. That's why you need to enable the option before the very first data submission.

A conversion isn't linked to a session if:

  • It occurred or you passed the conversion data more than 21 days after the site session.
  • The option is disabled.

If you use different IDs, conversion attribution methods will differ:

  • ClientID and UserID. Offline conversions and calls are added to the user's 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 website session as of March 5.
  • yclid. Conversions will be added to a session initiated through an ad linked to the transmitted yclid.

Special IDs

This is the ID of a unique site user that Yandex Metrica creates automatically.

Used for tracking offline conversions and calls and transmitting user parameters.

Transmit data using the ClientID if, for example, your website 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 pass data

For information on how to pass data, see the following sections:

Passing offline conversions

Passing call data