multiple mixpanel instances on client side

  • 7 September 2020
  • 2 replies

I am new to the mixpanel, i have to use two instances of mixpanel in same project but trouble while integrating 2 instances in same project. I have found this link but its not working in my case.

i have used below code:


mixpanel.init(token, {}, ‘library_name’);


while using track like this

mixpanel.track(‘page’, {object});

mixpanel.library_name.track(‘page’, {object});


the above code is not working and giving error on mixpanel.library_name not found.

Please help me here. Thanks in advance!

2 replies

Userlevel 2
Badge +1


I used to do the same and it worked well. 

Any change you are using Segment or sending track before init()? 


No, not sending track before init(). I am using Angular, where i have used mixpanel-browser librabry using npm for mixpanel integration.

Any hint on this side?