Author: Chris Mitchell
Tracking Pageviews with Google Analytics and Angular JS
Recently I noticed in my Google analytics dashboard that Analytics wasn’t tracking the full url of the page of my Angular JS site. I was tracking individual pageviews using this code in my app.js file:
MyApp.run(function($rootScope, $location, $window){
$rootScope.$on('$routeChangeSuccess', function() {
$window._gaq.push(['_trackPageview', $location.path()]);
})
})Read More