davide-scalzo / react-native-mixpanel

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

davodesign84 / react-native-mixpanel is not working fine. #270

Open chetan-sharma-newput opened 3 years ago

chetan-sharma-newput commented 3 years ago

davodesign84 / react-native-mixpanel is not working fine or maybe I am doing some mistake in my code,

registerSuperPropertyMixPanel(option) {
        MixPanel.registerSuperProperties(option.properties)
    }

registerUserOnMixPanel(peopleData) {
        MixPanel.createAlias(peopleData.uuid)
        MixPanel.identify(peopleData.uuid);
        MixPanel.setOnce(peopleData)
        this.registerSuperPropertyMixPanel({
            "properties": {
                "app": getConstant().PILOT_NAME,
                "pilotId": getConstant().PILOT_ID,
                "uuid": peopleData.uuid
            }
        })
        this.trackView("app.home")
    }

This is what I am doing when the user does login. In my app, there is no option for sign up for the user.

Now what I want? - I want to track all the anonymous activity of my user before his login and after his logout.

Now What I achieved? - my code is able to track the anonymous activity of my user before his login and after login, but when the user logs out from the app, I am unable to track his activity. On the Mixpanel database sometimes it creates a duplicate user profile, sometimes it does not.