From 5646a2224514766bc2783c132b144e0750f6e736 Mon Sep 17 00:00:00 2001 From: Paul Hooijenga Date: Mon, 5 Mar 2018 09:43:13 +0100 Subject: [PATCH] Fix "ReferenceError: ga is not defined" --- front/src/js/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/front/src/js/app.js b/front/src/js/app.js index 7fee1f2..18cb76b 100644 --- a/front/src/js/app.js +++ b/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()}); } });