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 florian-milky ,
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 Denis Holmes ,
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?
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?
Denis Holmes I think so!
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
Any issues with it and you can contact us again here in a comment, through another post or you can PM me!
Auto Capture is a very prominent feature for the Browser SDK and the Native SDK's i.e. the IOS and the Android SDKs. It allows us to capture the basic [Amplitude] events like Button clicks, Navigation to pages, Pages Viewed, etc. The project that I am currently working on already has a web version on which we use the…
How do I transfer data from one amplitude account to another? It seems all the community chats about this have completely broken links. Easy to export, no way to import, very frustrating. :(
When using @amplitude/plugin-web-vitals-browser with Create React App v4 (react-scripts@4.0.3), the build fails with: ./node_modules/@amplitude/plugin-web-vitals-browser/node_modules/web-vitals/dist/web-vitals.js<br /><br />SyntaxError:…
Hello, I'm using SpringBoot and Kotlin to integrate with the Amplitude Export API. The official Amplitude documentation (https://amplitude.com/docs/apis/analytics/export) states that "data is available to export at a minimum within 2 hours of when the servers received it." However, there's no clear information about the…
Hello, Is there a way to make a query like: “Give me all the users that have the user property X equal to 10”, by using just any of the APIs, without making a cohort first through the Amplitude’s UI? Thank you!