Added code snipped emitted from Google Analytics App to index.html, then added this to main controller
$scope.$on('$viewContentLoaded', function(event) {
$window._gaq.push(['_trackPageview', $location.path()]);
});
Done. Full tracking just works. Amazing!
3 comments:
AngularJS - looks so cool, but currently no project where I could introduce it :-(
You can also check out angulartics - http://luisfarzati.github.io/angulartics, a vendor-agnostic module for analytics, currently supporting Google Analytics only, but more providers will be coming in the near future.
Post a Comment