Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference ClientId - FullVisitorId

The documentation of the fullvisitorId states that it is "the unique visitor ID (also known as client ID)". The value of the fullvisitorId is however structured differently when comparing the clientId and the fullvisitorId in BQ. One question stated that the fullvisitorId is a hashed version of the clientId, however I cannot find an official documentation stating that.

My question is why are there two parameters stating the same information and if they are not the same what is the difference?

like image 834
Seney Avatar asked Oct 20 '25 04:10

Seney


1 Answers

They now also added clientId to the export schema. There it says:

Unhashed version of the Client ID for a given user associated with any given visit/session.

In the measurement protocol reference they state:

This field is required if User ID (uid) is not specified in the request. This anonymously identifies a particular user, device, or browser instance. For the web, this is generally stored as a first-party cookie with a two-year expiration. For mobile apps, this is randomly generated for each particular instance of an application install. The value of this field should be a random UUID (version 4) as described in http://www.ietf.org/rfc/rfc4122.txt.

So, it's randomly generated - for web it's a cookie, for app it's set per install (or if the IDFA changes). On the user id documentation they confirm this randomization by contrasting the two ids:

Randomly generated and automatically sent with all hits by Analytics libraries.

The hashing algorithm is not known. But in principle the only difference between the two is the hashing.

However, you can apply the hashing algorithm to your client ids since July 17, 2018 using the hashClientId method provided by the Management API. To do that, the API wants a client id and a web property id. Although providing the web property id could mean that they use it to salt the hash - they're not doing it. fullVisitorId is the same thing for different properties (tested using the Management API).

Which basically means they didn't want you to connect data using the client id and basically pseudo-/anonymized it. Now they're allowing it and you can connect data from different sources by either

  • creating the fullvisitorid using the Management API (for older data)
  • or using the client id from the new field (for newer data)
like image 97
Martin Weitzmann Avatar answered Oct 23 '25 07:10

Martin Weitzmann



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!