Solved

Modify user_id after user profile is created

  • 22 August 2022
  • 9 replies
  • 1049 views

Badge

Hi,

 

 

I would like to know if there is a capability to update user_id of existing events posted to Amplitude and remap the events to the new user_id.

We are having a need to remap our organizations primary user identifier and would like to know how we can achieve this for 1 customer vs all.

 

I already tried using Identity API but i just keep getting the error “missing_event” 

{

    "api_key": "…..",

    "identification": [

        {

            "user_id": "…...",

            "user_properties": {

                "user_id": "……."

            }

        }

    ]

}

 

Any input will be appreciated

icon

Best answer by Saish Redkar 22 August 2022, 21:19

View original

9 replies

Userlevel 7
Badge +10

Hi @huzefab 

Once ingested, event data in Amplitude is immutable. So there isn’t any way to update existing data.

Also, if you create a new user ID for an existing user, Amplitude will only recognize them as different unique users.

Badge

Hi @Saish Redkar, is it possible to merge the user so I do not lose their previous events associated with their old UserId ?

Userlevel 7
Badge +10

Hey @huzefab 

Amplitude explicitly mentions in this doc that User IDs cannot be merged

https://help.amplitude.com/hc/en-us/articles/115003135607#h_c323d7e5-4662-4a36-b0a1-5110a341e80c
 

I would also recommend reading the backfill guide if you really have to update user ids on your events and ingest your historical data in a new Amplitude project.

Badge

Thats a good suggestion. Thanks!

 

Userlevel 6
Badge +8

Hi @huzefab ! I wanted to follow-up and confirm @Saish Redkar’s understanding of how user IDs work in Amplitude as well as his suggestion on backfilling your historical data if you really need to update user IDs on historical events. 

Badge

We still do but backfill and new project may not work for us.

I am surprised that Amplitude does not have any solution in this regard.

This should be a common phenomenon with organizations who restructure their data as they grow and in the same effort, may land up reassigning new unique UserIds to existing customers.

 

Is this request being raised only now ?

Userlevel 7
Badge +10

@huzefab 

I totally resonate with your viewpoints here 💯
The very foundation of Amplitude is data immutability. We had to do multiple production data backfills just to get to the right data quality due to this. Our team has been in talks with Amplitude PMs recently over this issue, but I don’t think this will be addressed soon given the nature of the system.

Userlevel 6
Badge +8

@huzefab

I’ll be transparent that this isn’t the first time that this has been raised and I 100% hear you on this. From my past experience working with customers with similar issues, it just so happens that, for a good amount of those customers, the backfill solution does work for them due to multiple reasons. That said, I agree this is not an ideal solution if all you need is to just change the user_id.

Like Saish said, the foundation of Amplitude is data immutability which allows customers to preserve data as it was at the time of the event and historical integrity. However this does become an issue if bad data is introduced (no matter how much we champion good clean data and data governance) or restructuring happens like you said. While the current situation and solution is as discussed above, I warmly invite you to share your feedback on this topic at https://community.amplitude.com/ideas. We take feedback seriously and appreciate you taking the time to share how we can improve the Amplitude experience for you. 

Badge

Noted. Will share some thoughts once I figure out a solution for my story :) 

Thanks for your input @Saish Redkar and @belinda.chiu. Appreciate it!

Reply