From f8e3120b3a9bb014d827e65ea4fe066d0337e5ff Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Mon, 22 Jun 2015 18:49:15 -0500 Subject: [PATCH] fix(analytics): Move landing page tracking ...to AuthCtrl --- website/public/js/controllers/authCtrl.js | 2 ++ website/views/static/front.jade | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/website/public/js/controllers/authCtrl.js b/website/public/js/controllers/authCtrl.js index b706f27d07..0a893fdf3b 100644 --- a/website/public/js/controllers/authCtrl.js +++ b/website/public/js/controllers/authCtrl.js @@ -8,6 +8,8 @@ angular.module('habitrpg') .controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','ApiUrl', '$modal', 'Analytics', function($scope, $rootScope, User, $http, $location, $window, ApiUrl, $modal, Analytics) { + Analytics.track({'hitType':'pageview','eventCategory':'page','eventAction':'landing page','page':'/static/front'}); + $scope.logout = function() { localStorage.clear(); window.location.href = '/logout'; diff --git a/website/views/static/front.jade b/website/views/static/front.jade index f518838463..ffa0ee3e87 100644 --- a/website/views/static/front.jade +++ b/website/views/static/front.jade @@ -33,9 +33,6 @@ html(ng-app='habitrpg', ng-controller='RootCtrl') script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap.min.js') script(type='text/javascript', src='https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.12.1/ui-bootstrap-tpls.min.js') - script(type='text/javascript'). - Analytics.track({'hitType':'pageview','eventCategory':'page','eventAction':'landing page','page':'/static/front'}); - body(ng-controller='AuthCtrl') include ./login-modal include ../shared/header/avatar