cmackay / google-analytics-plugin

Cordova Google Analytics Plugin for Android & iOS
Apache License 2.0
89 stars 43 forks source link

Active page won't show in GA Real time #63

Closed albertleao closed 8 years ago

albertleao commented 8 years ago

My GA real time dashboard shows that my user is online, but even when sending

analytics.sendAppView('home', successCallback, errorCallback); and getting a callback of 'OK' but the active page does not update

cmackay commented 8 years ago

There are many potential problems that can occur in troubleshooting a hybrid app. It could be project specific, plugin issue, platform specific problem, or maybe an issue with the google analytics setup. I am not experiencing the same issue you are having. I just brought up a clean project by doing the below commands and I could see the app view showing up in GA real time view.

cordova create analytics-test cd analytics-test cordova platform add ios cordova platform add android cordova plugin add ../google-analytics-plugin/ echo "document.addEventListener('deviceready', function () {\n var analytics = navigator.analytics;\n\n analytics.setTrackingId('UA-XXXXXXX-1', function () {\n analytics.sendAppView('home');\n });\n}, false);" >> www/js/index.js

You might want to try do the same with your tracking id and see if that works. If that works that it might be an issue with the project setup. Hope that helps.

leandroz commented 8 years ago

When configuring the analytics account, we need to select mobile app or web app?

petarov commented 8 years ago

@leandroz You need to use Mobile App.