问题
I'm trying to use the google analytics on Cordova app, I've followed the instruction on the the repository , and all works well on the chrome android emulator . I see live activity on google analytics site.
but when i log into the app from the device , it seems the analytics is not recognizing the the app.
in my config.xml I have :
< access origin="*" >
In the android manifest I have the permissions :
android.permission.INTERNET
android.permission.ACCESS_NETWORK_STATE
When running in debug mode , i see the app is indeed going into the
cordova.exec(success, error, 'UniversalAnalytics', 'trackView', [screen]);
function , but it doesn't display any data on the google analytics view
any ideas?
回答1:
well, it seems Google analytics is updated after 24 hours or so when using the mobile Api.
Although I don't see any activity in the 'live-view' section I can see a log of my activities on the site from previous days (eCommerce analytics)
来源:https://stackoverflow.com/questions/29122565/cordova-plugin-danwilson-google-analytics-plugin-not-working-on-android-device