angular.module('spGABeacon', []).run(function($rootScope, $window, $location){
	$rootScope.$on('$locationChangeSuccess', function(event, toState, toParams){
		var trackerName = 'GTM-WJFT899';
		//Adding timeout function to ensure destination and not source page title is sent to GA
		setTimeout(function() {
			ga(trackerName + '.send', {
				hitType: 'pageview',
				title: $window.document.title,
				location: $location.absUrl()
			});
		}, 750);
	});
});