Explorar o código

Fix "ReferenceError: ga is not defined"

Paul Hooijenga %!s(int64=7) %!d(string=hai) anos
pai
achega
5646a22245
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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()});
         }
     });