Cross subdomain cookies

  • 6 December 2021
  • 1 reply

Hello, we are using mixpanel in two separate webpages. We need to track users with the same distinct id from one to another. Both pages are in the same subdomain ( and however all cookies are being set on their specific subdomain, and therefore not shared. I know mixpanel has an option for crosssubdomain cookies however it only sets them as empty or the full domain.


How can we resolve this issue? Should we pass the id from one site to another? is there a way to actually track with cross-subdomain?


Best answer by Muffaddal Qutbuddin 7 December 2021, 20:52

View original

1 reply

Userlevel 4
Badge +2

Hello @nicolito You can pass the distinct id from one domain to another via the link. What you have to do is append the distinct id  in the domain one as parameter to links that send user to the other domain and read the distinct id from the url and pass it to Mixpanel library during its initialization.  

Here is an article on cross-domain tracking in Mixpanel to get you started.