Skip to content

Anonymous Identities #168

@dabeeeenster

Description

@dabeeeenster

Anonymous Identity handling improvements:

  1. 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.
  2. If an anonymous user then authenticates, the SDK would call the merge method.
  3. Create a new anonymous_id property that the identify endpoint can accept
  4. 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

Metadata

Metadata

Labels

apiIssue related to the REST APIfeatureNew feature or requestsdkIssues related to the SDKs

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions