Mixpanel Events Not Linking to User: Understanding the Issue
I’ve implemented server-side logging for my project using the simplified API. When a user loads my homepage, three events are logged like this:
{
"event": "APP_LOAD_SUCCEEDED",
"properties": {
"distinct_id": "$device:5ff9dcfd-880e-4303-8a7a-131e6aebb724",
"$device_id": "5ff9dcfd-880e-4303-8a7a-131e6aebb724",
}
}
{
"event": "LANDING_PAGE_MOUNTED",
"properties": {
"distinct_id": "$device:5ff9dcfd-880e-4303-8a7a-131e6aebb724",
"$device_id": "5ff9dcfd-880e-4303-8a7a-131e6aebb724",
}
}
{
"event": "CREATE_DATASET_SCREEN_MOUNTED",
"properties": {
"distinct_id": "iSYUjPGqIrf6wp5oyzbBNLSMx303",
"$device_id": "5ff9dcfd-880e-4303-8a7a-131e6aebb724",
"$user_id": "iSYUjPGqIrf6wp5oyzbBNLSMx303",
}
}
The problem - Mixpanel doesn’t retroactively associate the first two events with the same user once the $user_id is available (see below) Is there a reason Mixpanel isn’t automatically linking these events to the user once the $user_id is identified? Does server-side logging require an explicit call to mixpanel.identify() to achieve this? I do not want to resort to calling identify() from the client because this will be blocked in ~30% of cases.