On startup of my app which uses the Google Analytics plugin, I get a failure which says the plugin is not installed:
03-11 18:41:31.568 16699 16699 I chromium: [INFO:CONSOLE(15607)] "DEVICE READY FIRED AFTER", source: file:///data/user/0/com.ionic.viewapp/files/files//7bfffa2d/build/main.js?ionicCachebuster=96341 (15607)
03-11 18:41:31.580 16699 16790 V StatusBar: Executing action: styleDefault
03-11 18:41:31.589 16699 16699 I chromium: [INFO:CONSOLE(353)] "Native: tried calling GoogleAnalytics.startTrackerWithId, but the GoogleAnalytics plugin is not installed.", source: file:///data/user/0/com.ionic.viewapp/files/files//7bfffa2d/build/main.js?ionicCachebuster=96341 (353)
03-11 18:41:31.589 16699 16699 I chromium: [INFO:CONSOLE(358)] "Install the GoogleAnalytics plugin: 'ionic plugin add cordova-plugin-google-analytics'", source: file:///data/user/0/com.ionic.viewapp/files/files//7bfffa2d/build/main.js?ionicCachebuster=96341 (358)
03-11 18:41:31.598 16699 16699 I chromium: [INFO:CONSOLE(59713)] "Error enabling analytics: plugin_not_installed", source: file:///data/user/0/com.ionic.viewapp/files/files//7bfffa2d/build/main.js?ionicCachebuster=96341 (59713)
However if I attempt to install it, it says it’s already installed:
âžś directory-on-tap git:(master) âś— ionic plugin add cordova-plugin-google-analytics
Plugin "cordova-plugin-google-analytics" already installed on android.
Plugin "cordova-plugin-google-analytics" already installed on ios.
I’ve seen a couple other people having a similar problem, but their solutions do not work for me:
- I am calling this within the
this.platform.ready()
handler - My call to
<script src="cordova.js"></script>
is the first script loaded inindex.html
Your system information:
Cordova CLI: 6.5.0
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.1
ios-sim version: 5.0.13
OS: macOS Sierra
Node Version: v7.5.0
Xcode version: Xcode 8.2.1 Build version 8C1002
Other suggestions are appreciated, thanks!