Fix google analytics trying to send events
This commit is contained in:
+3
-1
@@ -35,7 +35,9 @@ yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
|
|||||||
|
|
||||||
// Google Analytics
|
// Google Analytics
|
||||||
$rootScope.$on('$routeChangeSuccess', function(){
|
$rootScope.$on('$routeChangeSuccess', function(){
|
||||||
ga('send', 'pageview', {'page': $location.path()});
|
if (ga) {
|
||||||
|
ga('send', 'pageview', {'page': $location.path()});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// GitHub star button (asynchronously loaded iframe)
|
// GitHub star button (asynchronously loaded iframe)
|
||||||
|
|||||||
Reference in New Issue
Block a user