I started sending events from the backend with a specific device id and no user id.
What I can observe now is that the backend device id gets merged with random users.
How can I fix that?
I started sending events from the backend with a specific device id and no user id.
What I can observe now is that the backend device id gets merged with random users.
How can I fix that?
Hi
If you are sending a Device ID from the back end and there already exists a user with that Device ID, it will merge, expecting it to be the same user. You would need to make sure that no Device IDs you sent from the back end are also in the front-end unless you want them to merge. A suggestion I would have is to make sure the Device IDs from the server are unique in the sense that you might attach a prefix or suffix such as SER to identify the events coming from the user base. I hope that helps!
Kind Regards,
Denis
Hi
Thank you for your answer.
We have a specific Device ID for our backend that we never used in the frontend. So I don’t think the problem comes from there.
Another things we do is that we sometimes send events from the backend that we associate with the user (through User ID).
So we set up both User ID and Device ID (our backend) for these events. So in the user timeline we can see for example that we sent an email to them.
Is that possible in that case that our backend becomes merged into user timelines even for unrelated events? How should that be handled then?
Hi
The user should only merge if a user in Amplitude has the same User ID event sent to Amplitude and a user already exists or if an anonymous user sends the same Device ID for a user that already exists. So if the Device ID from the back-end also exists in the front-end, users will be merged. I would suggest to make sure that the Device ID is truly unique so that it will not merge users. Does that make sense?
Kind Regards,
Denis
For a while, we did it incorrectly and we attempted to set User ID for anonymous users (from the backend), so that could be why we’ve seen our backend device merged.
I’ll keep an eye out and maybe even rename our backend Device ID.
Thank you
Hi
Any issues with it and you can contact us again here in a comment, through another post or you can PM me!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. You can also create a Guest account below!
If you don't have an Amplitude account, you can create an Amplitude Starter account for free and enjoy direct access to the Community via SSO. Create an Amplitude account. Want to sign up as a guest? Create a Community account.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.