Null User Id's recorded by firebase

妖精的绣舞 提交于 2019-12-01 22:20:40

问题


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.


回答1:


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:

  • android function: setUserId(...)
  • ios function: 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.



来源:https://stackoverflow.com/questions/38633755/null-user-ids-recorded-by-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!