How does Personas handle identity merging?

Each incoming event is analyzed and external IDs are extracted (user_id, anonymous_id, email). The simplified algorithm works as follows:

  • We first search the Identity Graph for incoming external IDs.

  • If we find no users, we’ll create one.

  • If one user is returned, then that user is chosen.

  • If multiple users are returned, our merge protection kicks in and checks the validity of all of the provided external IDs.

    • If the merge protection checks pass, we’ll create a new merge connection between those two users. The first user profile ever created becomes the parent profile, and all merged users become child profiles.

    • If the merge protection checks fail, we’ll discard the lowest precedence external ID and re-run the algorithm.


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!