yandex metrica

Data Onboarding with UserID

the purpose and use cases of leveraging UserID
Yandex Metrica identifies each visitor with its own identifier ClientID. This ID is set in both cookies and localStorage, and gets shared across subdomains by default. A visitor who came to abc.com and then to sub.abc.com would be identified with the same ClientID in case the same Metrica tag is implemented on both.

UserID is another identifier that can be passed along with ClientID to onboard offline data in the future. UserID is the customer identifier used in your backend platform (CRM, CDP, whatever). The purpose of using the UserID is to open a possibility of onboarding customer attributes and events (e.g. sales data) mapped to your internal ID rather than to ClientID that is usually not stored on the backend.

Although many other product and marketing analytics platforms support data merging via UserID, Yandex Metrica does not. For example, if a person signed in on a laptop and on a smartphone with the same UserID, the automatically assigned ClientIDs for these two devices (browsers) with their data will not be merged into a single profile. Yandex Metrica reporting UI will report two unique Users.

Data Onboarding by UserID

Now imagine that for the Customers who are authorised on the website on multiple devices you passed in a UserID and then onboarded CRM data to enrich data captured in Metrica.
Scenario 1:
Two ClientIDs are sharing the same UserID 12345. You uploaded a file with that UserID and the member_crm parameter set to gold.
manual upload of user parameters via Metrica UI
userid,key,value
12345,member_crm,gold
As a result of this data enrichment, member_crm=gold would be applied to both ClientIDs linked to the UserID 12345.
Looks cool!
Scenario 2:
That same customer with UserID 12345 purchased something offline for 129.95 EUR. You uploaded that transaction as an offline conversion linking that purchase to the Metrica Goal ID "purchase_offline".
manual upload of offline conversions via Metrica UI
UserID,Target,DateTime,Price,Currency
12345,purchase_offline,1669223927,129.95,EUR
You may already begin to think what to expect in the reports considering that the user parameters are applied to all ClientIDs sharing the same UserID.

The offline conversion data processing affects the latest ClientID a given UserID was set for. So when you run a report by the Goal, you will see only 129.95 EUR and one Goal reached.
If you build a custom report with the ClientID dimension and the goal purchase_offline as shown in the screenshot, you'll find out what ClientID the onboarded data was applied to.
custom report to see offline conversions by ClientID
The good news is that the conversions are applied to a single ClientID. Be aware that if you export Metrica reports to calculate ratios like RPV, CR, etc., you may not get accurate result since the dominator (Users) counts each ClientID rather than uniques by UserID.

Takeaways

ClientID is set by Yandex Metrica automatically and is used to calculate Users.

UserID is your own identifier of customers that you may pass to Metrica for offline data onboarding. UserID can't be used for merging data associated with different ClientIDs. Consider UserID as an additional attribute (characteristic) primarily used for onboarded data processing.

User parameters uploaded with a UserID are applied to all ClientIDs that UserID has been passed for. Offline conversions uploaded with a UserID are applied to the latest ClientID with the provided UserID.