davide-scalzo / react-native-mixpanel

A React Native wrapper for Mixpanel tracking
MIT License
455 stars 195 forks source link

Mixpanel Profile not created after calling createAlias on Android #215

Open mark-carrington opened 4 years ago

mark-carrington commented 4 years ago

It seems MixPanel profiles aren't being created for our Android users until identify has been called. It seems this is an Android only issue, as we get these profiles on iOS right after the alias method has been called.

We're currently following the Mixpanel best practices, where we call alias with an email on sign up, and we call identify on sign in. For our App, once users have completed the sign up flow (calling alias in the process), they are then authenticated, so likely wouldn't sign in until their credentials expire.

This seems like a bug with the createAlias method, unless there is some valid reason why Android would not create profile on alias?

We've upgraded react-native-mixpanel to 1.1.14 (latest as of now), and the issues still seems to be present.

I did see a similar issue, where it's been suggested that call identify before any set method was called. But this seems to go against Mixpanel best practices, and could leave us vulnerable to a race condition where identify and track calls arrive less than a second after the alias (https://help.mixpanel.com/hc/en-us/articles/115004497803-Identity-Management-Best-Practices#serverside-aliasing).

MoeMamdouh commented 4 years ago

same issue with iOS also

MoeMamdouh commented 4 years ago

I'm very confused, how profile created with out identify()? How mixpanel know use data to create his profile?

r3nya commented 4 years ago

Hi there,

Just in case … Do you guys use mixpanel.reset() when users try to logout?

ghasemikasra39 commented 3 years ago

same issue on ios