Hello,
I'm trying to track my angular app with Google Analytics service, the code
below runs under the *module.run()* method and every time the route changes
the *window.ga() *is invoked and the callback function with the *alert() *shows
the message.
The problem is that in Google Analytics I don't see any records.
Any idea about it?
Thank you!
/*tracking in localhost*/
window.ga('create', 'MY_WEB_SITE_ID_HERE', {
cookieDomain: 'none'
});
//to every route change, requests a track to google
$rootScope.$on('$routeChangeSuccess', function(e, current, pre)
{
window.ga('send', 'pageview',
{
page: $location.path(),
hitCallback: function() {
alert('analytics.js done sending data');
}
});
});
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.