We are linking our firebase analytics data to BigQuery and upon analyzing found that the user id's are null for several users.
In what scenarios can this happen? and what is the solution for the same.
The bad behavior was when the user_id
property was populated with a value. The property user_id
should be null except if you set it explicitly with a call to that function:
setUserId(...)
setUserId(...)
If you don't explicitly call setUserId
, which is common, then the id you should use in BigQuery would be the app_instance_id
.
My advice: call setUserId once you have a logged in user (in Facebook, Google sign-in or whatever method you offer). This will give you a cross-device ID. If the user is not logged in, don't call it, and use the app_instance_id
id instead.
Note that the app_instance_id
change if the user uninstall & reinstall your app.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With