mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
fix(analytics): Move landing page tracking
...to AuthCtrl
This commit is contained in:
@@ -8,6 +8,8 @@ angular.module('habitrpg')
|
|||||||
.controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','ApiUrl', '$modal', 'Analytics',
|
.controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','ApiUrl', '$modal', 'Analytics',
|
||||||
function($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() {
|
$scope.logout = function() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
window.location.href = '/logout';
|
window.location.href = '/logout';
|
||||||
|
|||||||
@@ -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.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', 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')
|
body(ng-controller='AuthCtrl')
|
||||||
include ./login-modal
|
include ./login-modal
|
||||||
include ../shared/header/avatar
|
include ../shared/header/avatar
|
||||||
|
|||||||
Reference in New Issue
Block a user