If a user first hits a page they randomly assigned a distinct_id for Mixpanel. However, this should only be happening for non-logged-in users. For a logged-in user, we should be using the Mixpanel.identify(customer_id) method so events get tracked to their existing accounts.
If a user first hits a page they randomly assigned a distinct_id for Mixpanel. However, this should only be happening for non-logged-in users. For a logged-in user, we should be using the
Mixpanel.identify(customer_id)
method so events get tracked to their existing accounts.In sparkart.js, after Mixpanel is initialized:
If a customer doesn't exist, we should send the generated Mixpanel distinct_id to the server, where it'll be aliased after checkout is complete. For Reference: https://mixpanel.com/docs/integration-libraries/javascript