getDistinct ID Undefined
Opened this issue · 0 comments
bpfeiffer187 commented
Trying to get at the out of the Mixpanel Distinct ID to create a varible that can then be passed to other functions.
the function below returns undefined, but i have already had a different mixpanel event fire prior to this. Any thoughts?
const getMPID = () => {
Mixpanel.sharedInstanceWithToken(mixpanelToken()).then(() => {
Mixpanel.getDistinctId((id: any) => {
Mixpanel.identify(id);
});
});
};