Description
Our backend sends the User ID in the login API. As soon as we receive the User ID, we’re calling the .identify(userId)
function to set the DIstinct ID. But the events that trigger after login shows different Distinct ID on the Mixpanel dashboard. This is very inconsistent behavior and happens mostly on some Android devices. I’m not sure if it has anything to do with the manufacturer or the Android version itself. Also, I’m using both the react-native and Android Mixpanel libraries in my project (both have individual implementations but are identical). FYI, a single user can log in to multiple devices and can use the app simultaneously. I checked this in the documentation, Not exactly sure what is going wrong. https://docs.mixpanel.com/docs/tracking/how-tos/identifying-users#returning-user
Please refer to the below screenshot:
When I call the below function in the code, I’m seeing the right Distinct ID (that I passed in the .identify()
function)
const distinctId = await mixpanel.getDistinctId();
//Vishal: distinctId:::: 366
Library version I’m using:
"version": "2.2.5" //react-native
'com.mixpanel.android:mixpanel-android:7.+' //android