Anonymous Identity handling improvements:
- Add a way of signalling that an identity is "Anonymous" within all the SDKS when identifying a user. Anonymous identities prevent a record from being stored in the Flagsmith database, but provides the data to bucket the user in segments/mv flags etc.
- If an anonymous user then authenticates, the SDK would call the
merge method.
- Create a new
anonymous_id property that the identify endpoint can accept
- It stores the old ID in a new field
anonymous_id and makes the new ID the primary Identity ID so that administrators can search on the primary ID.
If present, the field anonymous_id is always used when calculating segment buckets/MV flags etc. This is to prevent a user moving between buckets before/after a merge.
What to do if we are asked to merge an Identity that already exists?
We overwrite the new anonymous_id with the existing anonymous_id
Anonymous Identity handling improvements:
mergemethod.anonymous_idproperty that theidentifyendpoint can acceptanonymous_idand makes the new ID the primary Identity ID so that administrators can search on the primary ID.If present, the field
anonymous_idis always used when calculating segment buckets/MV flags etc. This is to prevent a user moving between buckets before/after a merge.What to do if we are asked to merge an Identity that already exists?
We overwrite the new
anonymous_idwith the existinganonymous_id