可以使用用户 phone 号码作为 Crashlytics 用户 ID 吗?

Is it OK to use user phone number as Crashlytics user id?

在您的应用中使用 firebase 时,您可以设置两种类型的用户 ID。 Firebase Analytics 用户 ID 和 Firebase Crashlytics 用户 ID。 Analytics 用户 ID 可以像这样在代码中设置:

mFirebaseAnalytics.setUserId("123456");

crashlytics 用户 ID 可以这样设置:

FirebaseCrashlytics.getInstance().setUserId("12345")

根据Analytics documentations

Your user ID must not contain information that a third party could use to determine the identity of an individual user. For example, you cannot use a user's email address or social security number as a user ID.

我目前根本没有在我的代码中设置分析用户 ID。但是我设置了用户在我的应用程序中注册时使用的 phone 号码,作为他们的 crashlytics 用户 ID,所以如果他们报告崩溃,我会问他们他们的 phone 号码,看看他们到底经历了什么崩溃.

我能在Crashlytics documentations中找到的唯一解释是:

To diagnose an issue, it’s often helpful to know which of your users experienced a given crash. Crashlytics includes a way to anonymously identify users in your crash reports. To add user IDs to your reports, assign each user a unique identifier in the form of an ID number, token, or hashed value:

我的问题是,像分析这样的相同政策是否适用于 crashlytics?是否可以使用用户 phone 号码作为他们的 crashlytics id?

理想情况下,在任何形式的数字分析中,您都必须避免收集任何类型的个人身份信息 (PII)。在非常重视隐私法的国家/地区,这可能会让您陷入法律困境。 但是,根据 Google's Best Practices on PII

You can send Google Analytics an encrypted identifier or custom dimension that is based on PII, as long as you use the proper encryption level. Google has a minimum hashing requirement of SHA256 and strongly recommends the use of a salt, with a minimum of 8 characters. Notwithstanding any of the foregoing, you may not send Google Analytics encrypted Protected Health Information (as defined under HIPAA), even if it is hashed or salted.