Firebase Analytics Filter By User ID

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 14:47:11

问题


The Firebase Android SDK for analytics provides a method named setUserId(String id), now i enabled firebase logging and every time i called the method setUserId(1234) i see this in the logs Setting user property (FE): _id, 1234.

My question is how come the Firebase dashboard does not let us filter by this property, there is no property not for userId and not _id, i even tried to add _id as a property in the dashboard but Firebase does not allow property names to start with an underscore.

Do i really have to stop calling that method and just do setUserProperty("userId", 1234) or am i missing something...


回答1:


I have spent a few hours on this and found the answer i was looking for more or less, hopefully this might save someone else some time.

The only way to filter by Firebase's User Id property is by creating an audience, there you will be able to pick the user id property that is supplied from the setUserId(String id) method.

It is a downer though because you won't see any events for the user/user's you want from before the audience was created.




回答2:


In audience you have to select contains, exactly match or regular expression for a field.

So to filter for a user you have to add all your users to the audience, which looks cumbersome.

Isn't using setUserProperty is better? Have you faced any problems with using it ?



来源:https://stackoverflow.com/questions/42137190/firebase-analytics-filter-by-user-id

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