When can I call mixpanel.people.identify

How to specify mixpanel user ID of my registered user?

Do I need to call mixpanel.people.identify() every time my user logs in, or only the first time I create them on mixpanel?

If only for the first time, how does mixpanel know who to associate events with?

Also, as soon as I identify a person, will all events be broadcast for that person, or do I need to explicitly call people.set() to track the general event separately from the user-specific event?

+4
source share
1 answer

You should call mixpanel.people.identify() every time a user logs in. You can even call it every time the page loads in the login state if you want.

identify sets some data in the cookie that the distinct_id library should use when sending data to people.

If you called mixpanel.identify with the same distinct_id as mixpanel.people.identify , the events you send (with mixpanel.track ) will be displayed in the user profile on the Clients tab. In order for the user to be displayed at all, you will need to call mixpanel.people.set (or .add ) at least once.

EDIT: mixpanel.people.identify no longer required; you can just call mixpanel.identify and it will install both.

+3
source

Source: https://habr.com/ru/post/1447889/


All Articles