Actual event logs taking a few hours to reflects on the dashboard. So I am using DebugView
to analyse events.
My app has a login/logout feature. App can be used by multiple users.
On successful login, calling FirebaseAnalytics.getInstance(context).setUserId("user id")
.
Then after all the further logs goes under given user ID. Till now its good. But If I login with different user then user id doesn't get change and all logs events goes under previous one.
How to reset User Id on each login call?
You can remove the User ID by setting it to null or replace it with a new user ID. userID is just a user property that goes with all events after it is set so you need to set it to null when user logs out and set a new user ID when a different user logs in.
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