Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Amplitude ID #125

Open
jtmuller5 opened this issue Oct 27, 2022 · 1 comment
Open

Get Amplitude ID #125

jtmuller5 opened this issue Oct 27, 2022 · 1 comment

Comments

@jtmuller5
Copy link

Summary

Add a method to the Amplitude SDK to access the current user's "Amplitude ID".

Motivations

We have a funnel that allows a user to login half way through. For the first ~5 events, the Amplitude user ID is null so all events get recorded using the auto-generated "Amplitude ID". When the user logs in, we identify the user on the server side and a new session is created with the User ID and Amplitude ID equal to the logged in user ID.

Ideally, we want to pass the Amplitude ID from the front end to the backend so the user can be merged with an existing Amplitude ID.

The getUserId method returns null when a specific "User ID" hasn't been set.

image

@qingzhuozhen
Copy link
Contributor

Hi @jtmuller5, in Amplitude, we will merge the user and events after later setting the userId. You can read more here. The getUserId in SDK is only for the user id set via the SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants