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).

Examples of conversion reports:

Offline conversions and calls

When a user visits your site, Yandex Metrica collects information about the user's characteristics, behavior on the site, conversions, and other details. Your business may have other important information collected offline about payments, calls, and so on. You can pass this data to Yandex Metrica and attribute user behavior on the site to their actions offline.

Passing offline data can help you to:

  • Link users' online and offline history to get a better picture 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 pass the following types of offline data:

  • Offline conversions. For instance, information about orders that were created on the site and paid for at the office. This data can be passed 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.

How offline conversion attribution works

To link offline data to site users and their sessions, Yandex Metrica has a 21-day conversion tracking period. This means that data about an offline conversion is added to a session if 21 days or less have passed since the user's last session on the site when the file with conversion data is processed.

A conversion won't be attributed to a session if it occurred or was passed by you more than 21 days after the site session.

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 site session from March 5.
  • yclid. Conversions will be added to a session initiated through the ad linked to the transmitted yclid.
  • PurchaseId. Conversions will be added to the session that included an E-commerce purchase with the specified ID.
Special IDs

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

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

You can use the ClientID to pass data if your site doesn't have a dedicated ID framework or you don't need one.

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.

This is the site user ID assigned by the site owner.

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

It's a good idea to use the UserID to pass data if your site already has its own user ID framework (for example, based on usernames) and you actively use this kind of data.

In this case, you should:

  1. Set up ID transmission to Yandex Metrica using the setUserID JavaScript API method to associate a UserID with a ClientID.
  2. Pass the UserIDs with the other data in the CSV file. Your site user ID is associated with the ClientID of a particular user only if the setUserID method was called during the user's session. To get more complete statistics, we recommend waiting some time until more data is transmitted to Yandex Metrica.

This is the ID of a click on a Yandex Direct ad assigned by Yandex Direct. It's used to link conversions to ads in Yandex Direct. With this ID, you can track conversions both on your site and offline.

This is the E-commerce purchase ID assigned by the site owner. It's used to link conversions to sessions in which the purchase with the specified id occurred.

How to pass data

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