That's a WordPress site afaict, I don't see any NodeBB installation - what have I missed?
Hi, How can I track users in mixpanel and attribute the activity to their emails? Right now the mixpanel tracking is aggregated.
mixpanel gives the ability to identify users and tag them to their activity.
But I need to place this script to trigger after the user has logged in. How can I do that?
Is this mixpanel code intended to be run server-side or client-side?
Intended to be run on client side. Whenever nodebb is able to identify a user (at login), the above script needs to be called to set the user email or id to their usage data.
@vamsi-krishna In that case, you can check out the
app.user object in your dev console.
app.user.uid gives the logged in user ID, so you can use that for tracking. Keep in mind guests all have a uid of
0, so maybe only fire off tracking if
parseInt(app.user.uid, 10) > 0