Retaining mixpanel cookie value when hitting the back button

  • 24 September 2020
  • 6 replies

We have mixpanel setup on two different websites. The user generally go to our marketing site via an adsource and from there clicks to go to our main site which is a different domain. I have noticed that when the user navigates from the marketing site to the main site and hits the back button to come back to the marketing site, the mixpanel cookie value changes. The cookie key is of the form:

mp_xxxxxxx_mixpanel - where xxxxxxx is a random string. 

When we see the dev tools the value of the cookie above changes.

We feel this is causing duplicate leads to be generated messing up the numbers in our reports

6 replies

Userlevel 3
Badge +3

Are your both website under the same domain name and splitted by a sub domain? 

@robin Yes split by a subdomain

Userlevel 3
Badge +3

Did you follow one user on live-view that is having this behavior?

So we have been able to repro this cookie issue ourselves. Also we have seen multiple distinctIds being generated for the same user in mixpanel

Userlevel 3
Badge +3

This is weird. Are you sending identify() on each page view or action? This could be the only explication

These are prelogin screens on the marketing site. Login happens only after the user clicks on some and goes to our mainsite