[SOLVED - kinda] Mixpanel stopped working on iOS


#1

We have an Ionic v1 app and been using Mixpanel for metrics for over 6 months but in early March it just stopped working on iOS but is continuing to work normally for Android.

At first I thought it might be ATS but we’ve been running fine on iOS 9 since it was released. I’m 99.99% sure this isn’t an ATS issue.

Mixpanel is receiving events when running ionic serve and on Android devices. It is just an issue when running in iOS (simulator or device). The first 2-3 events come through - init/resume and state change events - but then they stop. No more events. No errors.

Has anyone else had this problem and found a solution?

> ionic info

Cordova CLI: 5.4.0
Gulp version:  CLI version 3.9.1
Gulp local:   Local version 3.9.1
Ionic Framework Version: 1.1.0
Ionic CLI Version: 2.0.0-beta.24
Ionic App Lib Version: 2.0.0-beta.14
ios-deploy version: 1.8.3
ios-sim version: 3.1.1
OS: Mac OS X El Capitan
Node Version: v5.3.0
Xcode version: Xcode 7.3 Build version 7D175

#2

Managed to fix this by reordering the index.html script tags so that mixpanel scripts comes before google api scripts (I’m using the maps api).

Not sure why this causes mixpanel to stop functioning on iOS, but there ya go.