소스 검색

Fix "ReferenceError: ga is not defined"

Paul Hooijenga 7 년 전
부모
커밋
5646a22245
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      front/src/js/app.js

+ 1 - 1
front/src/js/app.js

@@ -35,7 +35,7 @@ yltApp.run(['$rootScope', '$location', function($rootScope, $location) {
 
     // Google Analytics
     $rootScope.$on('$routeChangeSuccess', function(){
-        if (ga) {
+        if (typeof ga !== "undefined") {
             ga('send', 'pageview', {'page': $location.path()});
         }
     });