Hi Mixpanel! 🎫 I'm we're having issues integrating Userpilot with Mixpanel. They have provided some support and the outcome was that something happens at the time of initializing the Mixpanel in the main app component. The troubleshooting they provided showed that when we run mixpanel.init() in the devTools console, the Userpilot events are sent as expected. But somehow, this doesn't work if with the initialization happening in the code. Does anyone have experience with this from before or anyone from Mixpanel who can support us on that?
SOLVED: For future reference. The issue was that Userpilot was not finding the instance of mixpanel because mixpanel was not being added to the window (when using the npm package!). That has to do with how some bundlers work, in my case Vite. What solved it was to have the mixpanel instance added to the window object manually. This way Userpilot can access it when it wants to call MP's track() event. Another important thing when calling mixpanel.init() is to pass the name as 'mixpanel'. this may not be absolutely necessary, but just in case.