GAPlugin tracking fails silently


#1

I’m using https://github.com/AppGyver/GAPlugin, trying to get it to track page views in my news app.

I’m initializing it using:
gaPlugin.init(function() {alert('success')}, function() {alert('error')}, "MY-TRACKING-CODE", 1);
Neither the success nor error callbacks are working. I’ve also tried passing in regular objects as the functions, and also just strings. No luck.

I’ve tried installing these plugins with both plugman like it says on the plugin page, and with cordova’s own plugin manager commands.


#2

I don’t know if the plugin add some new features, but you can use the “default” analytics script from google like here


#3

Are you sure? I’ve tried that a number of times and it registers the path but does not track any views.


#4

I do this like this ga('send', 'pageview', {'page': window.location.pathname});


#5

Interesting. Does it show up in realtime for you when you view it in the simulator window?