Last active
December 18, 2015 19:49
-
-
Save adrianoxavier/5835419 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('analytics', []) | |
.service('analytics', function($rootScope, $window, $location) { | |
var track = function() { | |
$window._gaq.push(['_trackPageview', $location.path()]); | |
}; | |
$rootScope.$on('$viewContentLoaded', track); | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment