Problem Statement/Rationale
What is going wrong? What action would you like the Engineering team to take?
In DevTools we don't have any MongoDB identifier. We randomly generate an ID the first time the product is run and then we use that as a user id. The user id should not store the random UUID, it should store only AUID. The randomly generated UUID should be stored as an anonymous id.
To not break statistics for existing users:
- We should leave all current users with the tracking they have.
- for new users, we should use the field anonymousID and fill it with a random UUID.
That being said:
- On startup, for new users, we generate and store a new property called anonymousId.
- On startup, for users where userId already exists and anonymousId does not, we copy userId to anonymousId.
- For all users, we report both properties and sometimes userId will just happen to be null.
Steps to Reproduce
How could an engineer replicate the issue you’re reporting?
Check DevTools segment statistics.
Expected Results
What do you expect to happen?
UserId is populated only for old users. New users store the randomly generated UUID as anonymousId.
Actual Results
What do you observe is happening?
The randomly generated UUID is saved as userId.
Additional Notes
Any additional information that may be useful to include.