Skip to content

Firebase Analytics: Setting userID to null does not clear the userID #3602

Open
@zmeid

Description

@zmeid

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Bumblebee 2021.1.1 Patch 2
  • Firebase Component: firebase-analytics-ktx
  • Component version: firebase-bom:29.0.3

[REQUIRED] Step 3: Describe the problem

It is stated in the docs that setting the userID to null should remove the userID. But, it does not remove the user ID when it is set to null.

Steps to reproduce:

  • Enable firebase analytics debug view
  • Set user id with that method: firebaseAnalytics.setUserId(userId)
  • In Firebase debug view, verify that the user ID is reported.
  • Set userID to null: firebaseAnalytics.setUserId(null)
  • Expected: UserID is should be cleared from user properties.
  • Result: UserID remains the same as the previous value. Setting it to null does not clear it.

That's a big privacy issue. As a workaround, when user chooses to opt out from identified analytics, we set the userID to String "null". So, userID gets updated to String "null".

Some other related threads:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions