AmitMY
1
I tried adding analytics to my app.
console.log("Analytics ID", config.googleAnalytics);
GoogleAnalytics.startTrackerWithId(config.googleAnalytics).then(
res => console.log("res", res),
error => console.log("error", error),
);
Testing using ionic run browser
, this is the console output:
Analytics ID - the correct one from google analytics
error undefined
Why does it reject? How can I see the error?
Same issue here… have you found a solution?
AmitMY
3
Update to version 2.1.4 or above
Version 2.1.4 of Ionic CLI? I have 2.1.18…
It seems there are still open issues?
I also tried using a web GA tracking ID, but in either case I get the “Error: send timeout” when i call GoogleAnalytics.trackView(‘test’);
AmitMY
5
My appologies. Not 2.1.14, but 2.2.14. You can see in the releases:
google-analytics: fix startTrackerWithId when interval is not provided (49fe24d)
Version is of ionic-native, not ionic-cli