Closed kentpachi closed 9 years ago
Hi @kentpachi,
First I would recommend verifying you have the latest plugin.
cordova plugin remove com.cmackay.plugins.googleanalytics cordova plugin add com.cmackay.plugins.googleanalytics
Then, I would recommend adding the simplest snippet of analytics tracking code to your app and see if that works to try and isolate the problem.
Try adding the following block to your app:
document.addEventListener('deviceready', function () {
var analytics = navigator.analytics;
analytics.setTrackingId('UA-XXXX-XX', function () {
alert('tracking id set successfully');
analytics.sendAppView('home', function () {
alert('app view sent successfully');
}, function (err) {
alert('error sending app view: ' + err);
});
}, function (err) {
alert('error setting tracking id: ' + err);
});
}, false);
Then wait maybe a minute and see if any real time activity shows up in the analytics dashboard. Some things that may help in troubleshooting is to set the plugin log level to VERBOSE and the monitor the android log using 'adb logcat' while connected to the device.
Let me know what you find. Thanks!
-Craig
I had a similar problem and i fixed it by setting the time zone on google analytics (when you go to admin->view settings) to a US timezone (i am in europe). Afterwards the real time stuff was working (but be aware, it can be delayed for a few minutes). The normal stats are only showing up a few hours later. Maybe this helps.
Max
Also please check that the account is setup as a mobile account. This seems to be an issue in some cases.
http://stackoverflow.com/questions/18829584/google-analytics-in-ios-not-working
Hello,
I'm using you're plugin.
I followed your example and it works good.
Analytics is present and i send data via sendAppView and send.
The success callback says as response parameter "OK".
Everything looks good but there's no data in analytics. I've double checked this, and also checked Real time view which contains no data as well...
Any clue on this ?
I've created mobile application tracker in GA
Here's my code .
I have one for the first app run, and one is triggered on each location change ( angularJS )