Question

Merging events retrospectively

  • 14 March 2023
  • 2 replies
  • 38 views

Hi community! Happy to be here!

I have a setup where I pull together events from website and events from an application (two separate sources).

Everything seems to work, the only thing I’m struggling with is that I don’t know how to merge the website events (by the device_id) retrospectively into a new user_id.

Example:

  1. A new user signs up and does something in the app → a user_id #1 is created (= new account in the app) and the events from the website (“Try free” click, “Sign-up form”, etc) are attributed to user_id #1
  2. The user logs out and leaves
  3. The same user returns in the same browser and creates a new account (goes through p.1 with new credentials) → a user_id #2 with the device_id #1 (same as in p.1)

What ends up happening is the website events in p.3 (“Try free” click, “Sign-up form”, etc) are attributed to user_id #1 even after user_id #2 is created.

Question: how do I make the website events after the logout merged into the user_id #2 by the device_id #1?

I’d appreciate any help!


2 replies

Userlevel 6
Badge +9

Thanks for reaching out here @mike kosorukov. Our Help Center has more information on merging events here and merged users here. This is useful if you’re tracking two or more events that you would like to track as one single event instead or when Amplitude determines that an anonymous user—i.e., one whose only ID is a device ID—is actually a recognized user with an Amplitude ID. Please let us know if you need additional help!

Thanks for reaching out here @mike kosorukov. Our Help Center has more information on merging events here and merged users here. This is useful if you’re tracking two or more events that you would like to track as one single event instead or when Amplitude determines that an anonymous user—i.e., one whose only ID is a device ID—is actually a recognized user with an Amplitude ID. Please let us know if you need additional help!

Hi Jeremie, thanks a lot!

Unfortunately, the links you provided are leading to this post! Can you please provide the proper links?

Thanks!

Reply