yandex metrica

ClientID and User Count

how unique users (site visitors) are counted is shrouded in secrecy
Let's see what the documentation says:
Yandex.Metrica tracks users by anonymous browser IDs that are saved as cookies. The IDs let Yandex.Metrica distinguish between different users. (1)

Yandex.Metrica automatically assigns a ClientID to each unique site user. This ID is anonymous: it is randomly generated and identifies the browser that was used to view the site. (2)

In all Yandex.Metrica reports users are registered based on anonymous browser IDs that are saved as cookies. (3)

ClientID is unique website user ID created automatically by Yandex.Metrica. The ID is anonymous, randomly generated, and is associated with the browser where the user opened the website. (4)
You may make a conclusion that the number of unique Users should equal to the number of ClientIDs. However, it does not look to be always the case. Just build a report by ClientID to check your data.
Users by ClientID (report extract). How is that possible that multiple Users share the same ClientID?
I have examined multiple accounts and tags. Every time I could observe a relatively low number of ClientIDs with 2+ Users. What the heck?..

I ran a number of experiments to figure out the cause of that to try to determine how Metrica counts Users. This was also driven by the fact that there is a discrepancy between what's reported in Metrica UI and a distinct count by ClientID applied to the exported data. Even Yandex representatives confirmed this as "normal". Although, it looks odd.

Let's examine one of the IDs in Logs:
Sessions (visits) exported via Logs API. Pay attention to different VisitIDs assigned shortly.
Hits exported via Logs API. Every row stands for a pageview and linked to its own Session (visitID) through watchID.
Questions:
  • Why does each pageview form a unique session (visitID)?
  • What other data attribute(s) is used by Metrica for counting unique Users?

Takeaways

Yandex Metrica UI may return slightly inflated number of Users as it does not count uniques just by ClientID. The real method of calculating the number of Users is not described in any public documentation.

More accurate number of unique ClientIDs may be computed following raw data export via Logs API.