Skip to content

Unable to Override distinct_id in Mixpanel After Calling identify #169

@sharifelshalabi

Description

@sharifelshalabi

I am encountering an issue with setting a custom distinct_id for Mixpanel events. Currently, Mixpanel defaults to using the device ID as the distinct_id. I am attempting to override this by explicitly calling identify with a custom user ID. My code is structured as follows:

instance
   .identify(user.id?.toString() ?? '')
   .then((_) => user.analyticParams.forEach(instance.getPeople().set));

The expected behavior is that Mixpanel should use the user.id provided in the identify method as the distinct_id for all subsequent events. However, it seems that Mixpanel still defaults to the device ID instead of the custom ID I've set.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions