Google analytics plugin, not working on iOS, but good on android

Hi there,

I am using https://github.com/danwilson/google-analytics-plugin.git plugin to achieve the google analytics. This is working good on android but not on iOS. This is what I am doing

. $ionicPlatform.ready(function() {
. … if(typeof analytics !== ‘undefined’) {
. … … analytics.startTrackerWithId(this.getId(), function(success) {
. … … … console.log("Google analytics started " + success);
. … … }, function(error) {
. … … … console.log("Google analytics could not be started " + error);
. … … });
. … } else {
. … … console.log(“Google analytics cannot be initialized. Unavailable”);
. … }
});

On iOS, the typeof analytics is always ‘undefined’, and so this is not working. Can anyone help me on this?

Thank you

do u know, how to get back tracked events inside the app?

try to use window.analytics in place of analytics