snowplow / snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
http://snowplowanalytics.com
Apache License 2.0
110 stars 63 forks source link

Hardcode the anonymised session user ID (close #566) #567

Closed mscwilson closed 1 year ago

mscwilson commented 1 year ago

For issue #566.

When userAnonymisation is on, one of the identifiers that is anonymised is the session user ID (userId in client_session). The existing userId is replaced with a null UUID (00000000-0000-0000-0000-000000000000), previously generated like this: new UUID(0, 0).toString().

A bug in some Motorola phones caused a truncation of the full null UUID 00000000-0000-0000-0000-000000000000 to 0000-0000 when toString() is called on it. In our tracker, this meant that some events were going to the Bad events rows, as the session user ID was no longer a valid UUID.

This change hardcodes the null UUID as a string.