Merge pull request #265 from hackedd/ga-undefined

Fix "ReferenceError: ga is not defined"
This commit is contained in:
Gaël Métais
2018-03-05 08:52:21 -06:00
committed by GitHub
+1 -1
View File
@@ -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()});
}
});