Table of Contents
Note: If you do not have a system of assigning User IDs (either client or server-side), then you should skip this section.
Assigning User IDs
Products that have some kind of login system can track users even if they switch devices. Though assigning User IDs is optional, we recommend that products with a login system or a UUID (unique user identifier) system assign a User ID.
With a User ID, Amplitude can match events across multiple devices under the same user (same User ID). Furthermore, a User ID does not need to be assigned immediately. A user's event data will be merged on the backend so that all anonymous events up to the point of User ID assignment will be connected to the assigned User ID (assuming the Device ID is consistent).
We recommend reading more on how we count unique users, to get a full understanding of how we identify and merge users.
Important Recommendations on Setting User IDs
- Do not set User ID if there isn't one. For example, setting a User ID to the string 'None' to multiple users will group all events under that 'None' User ID together (e.g. any user with the 'None' User ID is assumed to be the same single user). You can always set the User ID later, and Amplitude has a built-in logic that will merge the anonymous events to the later identified user (see Example 2).
- Do not assign a User ID that might change. If someone’s email can change within your app, then it is not a good idea to set it as a User ID as Amplitude will mark the person as a new user if they change their email.
- User IDs are case-sensitive. If you set a user's User ID with a different casing, that user will have two separate profiles.
- Assigning User IDs properly can be tricky if you have a system that does it server-side. If you feel that you are running into issues assigning User IDs, then please contact us here.
Sending Data to Amplitude
Find specific information on how to send data to Amplitude here:
- Amplitude SDKs: Find our list of SDKs here.
- Amplitude HTTP API: Use our HTTP API to send server-side event data.
- Segment.io: See Segment / Amplitude Integration for more information.
- mParticle: See mParticle / Amplitude Integration for more information.