phonegap-build / GAPlugin

Google Analytics Plugin
MIT License
170 stars 141 forks source link

Cannot trackPage #65

Closed vleango closed 10 years ago

vleango commented 10 years ago

Not sure what I'm doing wrong,

I initialized the plugin and tried to track the page like this:

gaPlugin = window.plugins.gaPlugin;
gaPlugin.init(function() {alert('success');}, function() {alert('fail');}, "UA-XXXXXXX-X", 10);
gaPlugin.trackPage( function(result) {alert('success: ' + result);}, function(error) {alert('fail: ' + error);}, "https://www.mytesturl.com/page1");

But after checking in google's realtime tracker, I never see the page being logged.

svt-bmj commented 10 years ago

We're having a similar problem, if we debug using weinre we're seeing this error in the console

Value null at 3 of type org.json.JSONObject$1 cannot be converted to long

vleango commented 10 years ago

I found my issue. It was because I was using my web-based app account. I needed to create a new mobile app and use that UA-xxxxxxx-x id instead.