mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Revert "feat(analytics): Analytics service"
This reverts commit 9a0e31db40.
This commit is contained in:
@@ -243,7 +243,7 @@ window.habitrpg = angular.module('habitrpg',
|
||||
.state('options.settings.notifications', {
|
||||
url: "/notifications",
|
||||
templateUrl: "partials/options.settings.notifications.html"
|
||||
});
|
||||
})
|
||||
|
||||
var settings = JSON.parse(localStorage.getItem(STORAGE_SETTINGS_ID));
|
||||
if (settings && settings.auth) {
|
||||
@@ -252,7 +252,3 @@ window.habitrpg = angular.module('habitrpg',
|
||||
$httpProvider.defaults.headers.common['x-api-key'] = settings.auth.apiToken;
|
||||
}
|
||||
}])
|
||||
|
||||
.run(['Analytics', function(Analytics) {
|
||||
if (window.env.NODE_ENV === 'production') Analytics.loadScripts();
|
||||
}]);
|
||||
|
||||
@@ -5,8 +5,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) {
|
||||
.controller("AuthCtrl", ['$scope', '$rootScope', 'User', '$http', '$location', '$window','ApiUrl', '$modal',
|
||||
function($scope, $rootScope, User, $http, $location, $window, ApiUrl, $modal) {
|
||||
|
||||
$scope.logout = function() {
|
||||
localStorage.clear();
|
||||
@@ -47,14 +47,14 @@ angular.module('habitrpg')
|
||||
$http.post(url, scope.registerVals).success(function(data, status, headers, config) {
|
||||
runAuth(data.id, data.apiToken);
|
||||
if (status == 200) {
|
||||
Analytics.register();
|
||||
mixpanel.alias(data._id);
|
||||
if (data.auth.facebook) {
|
||||
Analytics.updateUser({'email':data.auth.facebook._json.email,'language':data.preferences.language});
|
||||
Analytics.track({'hitType':'event','eventCategory':'acquisition','eventAction':'register','authType':'facebook'});
|
||||
mixpanel.register({'authType':'facebook','email':data.auth.facebook._json.email})
|
||||
} else {
|
||||
Analytics.updateUser({'email':data.auth.local.email,'language':data.preferences.language});
|
||||
Analytics.track({'hitType':'event','eventCategory':'acquisition','eventAction':'register','authType':'email'});
|
||||
mixpanel.register({'authType':'email','email':data.auth.local.email})
|
||||
}
|
||||
mixpanel.register({'UUID':data._id,'language':data.preferences.language});
|
||||
mixpanel.track('Registration');
|
||||
}
|
||||
}).error(errorAlert);
|
||||
};
|
||||
@@ -68,15 +68,15 @@ angular.module('habitrpg')
|
||||
.success(function(data, status, headers, config) {
|
||||
runAuth(data.id, data.token);
|
||||
if (status == 200) {
|
||||
Analytics.login();
|
||||
Analytics.updateUser();
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'login'});
|
||||
mixpanel.identify(data.id);
|
||||
mixpanel.register({'UUID':data._id});
|
||||
mixpanel.track('Login');
|
||||
}
|
||||
}).error(errorAlert);
|
||||
};
|
||||
|
||||
$scope.playButtonClick = function(){
|
||||
Analytics.track({'hitType':'event','eventCategory':'button','eventAction':'click','eventLabel':'Play'})
|
||||
window.ga && ga('send', 'event', 'button', 'click', 'Play');
|
||||
if (User.authenticated()) {
|
||||
window.location.href = ('/' + window.location.hash);
|
||||
} else {
|
||||
@@ -144,9 +144,9 @@ angular.module('habitrpg')
|
||||
$http.post(ApiUrl.get() + "/api/v2/user/auth/social", auth)
|
||||
.success(function(data, status, headers, config) {
|
||||
if (status == 200) {
|
||||
Analytics.login();
|
||||
Analytics.updateUser();
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'login'});
|
||||
mixpanel.identify(data.id);
|
||||
mixpanel.register({'UUID':data._id});
|
||||
mixpanel.track('Login');
|
||||
}
|
||||
runAuth(data.id, data.token);
|
||||
}).error(errorAlert);
|
||||
|
||||
@@ -25,11 +25,20 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl) {
|
||||
// Stripe
|
||||
$.getScript('//checkout.stripe.com/v2/checkout.js');
|
||||
|
||||
// Google Content Experiments
|
||||
// Google Analytics, only in production
|
||||
if (window.env.NODE_ENV === 'production') {
|
||||
// Get experiments API
|
||||
$.getScript('//www.google-analytics.com/cx/api.js?experiment=t-AFggRWQnuJ6Teck_x1-Q', function(){
|
||||
$rootScope.variant = cxApi.chooseVariation();
|
||||
$rootScope.$apply();
|
||||
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
ga('create', window.env.GA_ID, {userId:User.user._id});
|
||||
ga('require', 'displayfeatures');
|
||||
ga('send', 'pageview');
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -286,8 +286,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
});
|
||||
}])
|
||||
|
||||
.controller('ChatCtrl', ['$scope', 'Groups', 'User', '$http', 'ApiUrl', 'Notification', 'Members', '$rootScope', 'Analytics',
|
||||
function($scope, Groups, User, $http, ApiUrl, Notification, Members, $rootScope, Analytics){
|
||||
.controller('ChatCtrl', ['$scope', 'Groups', 'User', '$http', 'ApiUrl', 'Notification', 'Members', '$rootScope', function($scope, Groups, User, $http, ApiUrl, Notification, Members, $rootScope){
|
||||
$scope.message = {content:''};
|
||||
$scope._sending = false;
|
||||
|
||||
@@ -322,9 +321,9 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
$scope.message.content = '';
|
||||
$scope._sending = false;
|
||||
if (group.privacy == 'public'){
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'group chat','groupType':group.type,'privacy':group.privacy,'groupName':group.name,'message':message});
|
||||
mixpanel.track('Group Chat',{'groupType':group.type,'privacy':group.privacy,'groupName':group.name,'message':message})
|
||||
} else {
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'group chat','groupType':group.type,'privacy':group.privacy});
|
||||
mixpanel.track('Group Chat',{'groupType':group.type,'privacy':group.privacy})
|
||||
}
|
||||
}, function(err){
|
||||
$scope._sending = false;
|
||||
@@ -418,8 +417,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
|
||||
}])
|
||||
|
||||
.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$rootScope', '$state', '$location', '$compile', 'Analytics',
|
||||
function($scope, Groups, User, Challenges, $rootScope, $state, $location, $compile, Analytics) {
|
||||
.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$rootScope', '$state', '$location', '$compile',
|
||||
function($scope, Groups, User, Challenges, $rootScope, $state, $location, $compile) {
|
||||
$scope.groups = {
|
||||
guilds: Groups.myGuilds(),
|
||||
"public": Groups.publicGuilds()
|
||||
@@ -437,8 +436,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
|
||||
if (confirm(window.env.t('confirmGuild'))) {
|
||||
group.$save(function(saved){
|
||||
if (saved.privacy == 'public') {Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'join group','owner':true,'groupType':'guild','privacy':saved.privacy,'groupName':saved.name})}
|
||||
else {Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'join group','owner':true,'groupType':'guild','privacy':saved.privacy})}
|
||||
if (saved.privacy == 'public') {mixpanel.track('Join Group',{'owner':true,'groupType':'guild','privacy':saved.privacy,'groupName':saved.name})}
|
||||
else {mixpanel.track('Join Group',{'owner':true,'groupType':'guild','privacy':saved.privacy})}
|
||||
$rootScope.hardRedirect('/#/options/groups/guilds/' + saved._id);
|
||||
});
|
||||
}
|
||||
@@ -453,8 +452,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
}
|
||||
|
||||
group.$join(function(joined){
|
||||
if (joined.privacy == 'public') {Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'join group','owner':false,'groupType':'guild','privacy':joined.privacy,'groupName':joined.name})}
|
||||
else {Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'join group','owner':false,'groupType':'guild','privacy':joined.privacy})}
|
||||
if (joined.privacy == 'public') {mixpanel.track('Join Group',{'owner':false,'groupType':'guild','privacy':joined.privacy,'groupName':joined.name})}
|
||||
else {mixpanel.track('Join Group',{'owner':false,'groupType':'guild','privacy':joined.privacy})}
|
||||
$rootScope.hardRedirect('/#/options/groups/guilds/' + joined._id);
|
||||
})
|
||||
}
|
||||
@@ -509,8 +508,8 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
}
|
||||
])
|
||||
|
||||
.controller("PartyCtrl", ['$rootScope','$scope', 'Groups', 'User', 'Challenges', '$state', '$compile', 'Analytics',
|
||||
function($rootScope,$scope, Groups, User, Challenges, $state, $compile, Analytics) {
|
||||
.controller("PartyCtrl", ['$rootScope','$scope', 'Groups', 'User', 'Challenges', '$state', '$compile',
|
||||
function($rootScope,$scope, Groups, User, Challenges, $state, $compile) {
|
||||
$scope.type = 'party';
|
||||
$scope.text = window.env.t('party');
|
||||
$scope.group = $rootScope.party = Groups.party();
|
||||
@@ -520,7 +519,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
|
||||
$scope.create = function(group){
|
||||
group.$save(function(){
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'join group','owner':true,'groupType':'party','privacy':'private'});
|
||||
mixpanel.track('Join Group',{'owner':true,'groupType':'party','privacy':'private'});
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
});
|
||||
}
|
||||
@@ -528,7 +527,7 @@ habitrpg.controller("GroupsCtrl", ['$scope', '$rootScope', 'Shared', 'Groups', '
|
||||
$scope.join = function(party){
|
||||
var group = new Groups.Group({_id: party.id, name: party.name});
|
||||
group.$join(function(){
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'join group','owner':false,'groupType':'party','privacy':'private'});
|
||||
mixpanel.track('Join Group',{'owner':false,'groupType':'party','privacy':'private'});
|
||||
$rootScope.hardRedirect('/#/options/groups/party');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
habitrpg.controller("InventoryCtrl",
|
||||
['$rootScope', '$scope', 'Shared', '$window', 'User', 'Content', 'Analytics',
|
||||
function($rootScope, $scope, Shared, $window, User, Content, Analytics) {
|
||||
['$rootScope', '$scope', 'Shared', '$window', 'User', 'Content',
|
||||
function($rootScope, $scope, Shared, $window, User, Content) {
|
||||
|
||||
var user = User.user;
|
||||
|
||||
@@ -180,7 +180,7 @@ habitrpg.controller("InventoryCtrl",
|
||||
$rootScope.selectedQuest = undefined;
|
||||
}
|
||||
$scope.questInit = function(){
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'quest','owner':true,'response':'accept','questName':$scope.selectedQuest.key});
|
||||
mixpanel.track("Quest",{"owner":true,"response":"accept","questName":$scope.selectedQuest.key});
|
||||
$rootScope.party.$questAccept({key:$scope.selectedQuest.key}, function(){
|
||||
$rootScope.party.$get();
|
||||
});
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
habitrpg.controller('NotificationCtrl',
|
||||
['$scope', '$rootScope', 'Shared', 'Content', 'User', 'Guide', 'Notification', 'Analytics',
|
||||
function ($scope, $rootScope, Shared, Content, User, Guide, Notification, Analytics) {
|
||||
['$scope', '$rootScope', 'Shared', 'Content', 'User', 'Guide', 'Notification',
|
||||
function ($scope, $rootScope, Shared, Content, User, Guide, Notification) {
|
||||
|
||||
$rootScope.$watch('user.stats.hp', function (after, before) {
|
||||
if (after <= 0){
|
||||
@@ -87,7 +87,7 @@ habitrpg.controller('NotificationCtrl',
|
||||
Notification.drop(User.user._tmp.drop.dialog);
|
||||
}
|
||||
$rootScope.playSound('Item_Drop');
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'acquire item','itemName':after.key,'acquireMethod':'Drop'});
|
||||
mixpanel.track("Acquire Item",{'itemName':after.key,'acquireMethod':'Drop'})
|
||||
});
|
||||
|
||||
$rootScope.$watch('user.achievements.streak', function(after, before){
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
/* Make user and settings available for everyone through root scope.
|
||||
*/
|
||||
|
||||
habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$http', '$state', '$stateParams', 'Notification', 'Groups', 'Shared', 'Content', '$modal', '$timeout', 'ApiUrl', 'Payments','$sce','$window','Analytics',
|
||||
function($scope, $rootScope, $location, User, $http, $state, $stateParams, Notification, Groups, Shared, Content, $modal, $timeout, ApiUrl, Payments, $sce, $window, Analytics) {
|
||||
habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$http', '$state', '$stateParams', 'Notification', 'Groups', 'Shared', 'Content', '$modal', '$timeout', 'ApiUrl', 'Payments','$sce','$window',
|
||||
function($scope, $rootScope, $location, User, $http, $state, $stateParams, Notification, Groups, Shared, Content, $modal, $timeout, ApiUrl, Payments, $sce, $window) {
|
||||
var user = User.user;
|
||||
|
||||
var initSticky = _.once(function(){
|
||||
@@ -15,7 +15,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
||||
|
||||
$rootScope.$on('$stateChangeSuccess',
|
||||
function(event, toState, toParams, fromState, fromParams){
|
||||
if (!!fromState.name) Analytics.track({'hitType':'pageview','eventCategory':'navigation','eventAction':'navigate','page':'/#/'+toState.name});
|
||||
if (!!fromState.name) window.ga && ga('send', 'pageview', {page: '/#/'+toState.name});
|
||||
// clear inbox when entering or exiting inbox tab
|
||||
if (fromState.name=='options.social.inbox' || toState.name=='options.social.inbox') {
|
||||
User.user.ops.update && User.set({'inbox.newMessages':0});
|
||||
@@ -126,7 +126,7 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
||||
// Otherwise use the proper $modal.open
|
||||
$rootScope.openModal = function(template, options){//controller, scope, keyboard, backdrop){
|
||||
if (!options) options = {};
|
||||
if (options.track) Analytics.track(_.merge(options.track,{'hitType':'event','eventCategory':'button','eventAction':'click'}));
|
||||
if (options.track) window.ga && ga('send', 'event', 'button', 'click', options.track);
|
||||
if(template === 'newStuff') return forceLoadBailey(template, options);
|
||||
return $modal.open({
|
||||
templateUrl: 'modals/' + template + '.html',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','Notification', '$http', 'ApiUrl', '$timeout', 'Shared', 'Guide', 'Tasks', 'Analytics',
|
||||
function($scope, $rootScope, $location, User, Notification, $http, ApiUrl, $timeout, Shared, Guide, Tasks, Analytics) {
|
||||
habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','Notification', '$http', 'ApiUrl', '$timeout', 'Shared', 'Guide', 'Tasks',
|
||||
function($scope, $rootScope, $location, User, Notification, $http, ApiUrl, $timeout, Shared, Guide, Tasks) {
|
||||
$scope.obj = User.user; // used for task-lists
|
||||
$scope.user = User.user;
|
||||
|
||||
@@ -25,8 +25,8 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
||||
else if (direction === 'up') $rootScope.playSound('Plus_Habit');
|
||||
}
|
||||
User.user.ops.score({params:{id: task.id, direction:direction}});
|
||||
Analytics.updateUser();
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'score task','taskType':task.type,'direction':direction});
|
||||
mixpanel.register({'Gold':Math.floor(User.user.stats.gp),'Health':Math.ceil(User.user.stats.hp),'Experience':Math.floor(User.user.stats.exp),'Level':User.user.stats.lvl,'Mana':Math.floor(User.user.stats.mp),'Class':User.user.stats.class,'subscription':User.user.purchased.plan.planId,'contributorLevel':User.user.contributor.level,'UUID':User.user._id});
|
||||
mixpanel.track('Score Task',{'taskType':task.type,'direction':direction});
|
||||
};
|
||||
|
||||
function addTask(addTo, listDef, task) {
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
*/
|
||||
|
||||
angular.module('habitrpg').factory('Guide',
|
||||
['$rootScope', 'User', '$timeout', '$state', 'Analytics',
|
||||
function($rootScope, User, $timeout, $state, Analytics) {
|
||||
['$rootScope', 'User', '$timeout', '$state',
|
||||
function($rootScope, User, $timeout, $state) {
|
||||
|
||||
var chapters = {
|
||||
intro: [
|
||||
@@ -184,13 +184,14 @@ function($rootScope, User, $timeout, $state, Analytics) {
|
||||
$state.go(step.state);
|
||||
return $timeout(function(){});
|
||||
}
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'tutorial','eventLabel':k+'-web','eventValue':i+1,'complete':false})
|
||||
window.ga && ga('send', 'event', 'behavior', 'tour', k, i+1);
|
||||
mixpanel.track('Tutorial',{'tour':k+'-web','step':i+1,'complete':false});
|
||||
}
|
||||
step.onHide = function(){
|
||||
if (step.final) { // -2 indicates complete
|
||||
var ups={};ups['flags.tour.'+k] = -2;
|
||||
User.set(ups);
|
||||
Analytics.track({'hitType':'event','eventCategory':'behavior','eventAction':'tutorial','eventLabel':k+'-web','eventValue':i+1,'complete':true})
|
||||
mixpanel.track('Tutorial',{'tour':k+'-web','step':i+1,'complete':true});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,10 +22,10 @@ window.habitrpg = angular.module('habitrpg', ['chieffancypants.loadingBar', 'ui.
|
||||
$scope.Math = window.Math;
|
||||
}])
|
||||
|
||||
.controller("PlansCtrl", ['$rootScope','Analytics',
|
||||
function($rootScope,Analytics) {
|
||||
.controller("PlansCtrl", ['$rootScope',
|
||||
function($rootScope) {
|
||||
$rootScope.clickContact = function(){
|
||||
Analytics.track({'hitType':'event','eventCategory':'button','eventAction':'click','eventLabel':'Contact Us (Plans)'})
|
||||
window.ga && ga('send', 'event', 'button', 'click', 'Contact Us (Plans)');
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
@@ -21,6 +21,11 @@ html(ng-app="habitrpg", ng-controller="RootCtrl", ng-class='{"applying-action":a
|
||||
script(type='text/javascript').
|
||||
window.env = !{JSON.stringify(env)};
|
||||
|
||||
script(type='text/javascript').
|
||||
(function(f,b){if(!b.__SV){var a,e,i,g;window.mixpanel=b;b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
|
||||
for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2;a=f.createElement("script");a.type="text/javascript";a.async=!0;a.src="undefined"!==typeof MIXPANEL_CUSTOM_LIB_URL?MIXPANEL_CUSTOM_LIB_URL:"//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";e=f.getElementsByTagName("script")[0];e.parentNode.insertBefore(a,e)}})(document,window.mixpanel||[]);
|
||||
mixpanel.init(window.env.MP_ID);
|
||||
|
||||
!= env.getManifestFiles("app")
|
||||
|
||||
//webfonts
|
||||
|
||||
@@ -34,7 +34,12 @@ 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-tpls.min.js')
|
||||
|
||||
script(type='text/javascript').
|
||||
Analytics.track({'hitType':'pageview','eventCategory':'page','eventAction':'landing page','page':'/static/front'});
|
||||
(function (f, b) {if (!b.__SV) {var a, e, i, g;window.mixpanel = b;b._i = [];b.init = function (a, e, d) {function f(b, h) {var a = h.split(".");2 == a.length && (b = b[a[0]], h = a[1]);b[h] = function () {b.push([h].concat(Array.prototype.slice.call(arguments, 0)))}}var c = b;"undefined" !== typeof d ? c = b[d] = [] : d = "mixpanel";c.people = c.people || [];c.toString = function (b) {var a = "mixpanel";"mixpanel" !== d && (a += "." + d);b || (a += " (stub)");return a};c.people.toString = function () {return c.toString(1) + ".people (stub)"};i = "disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
|
||||
for (g = 0; g < i.length; g++)f(c, i[g]);b._i.push([a, e, d])};b.__SV = 1.2;a = f.createElement("script");a.type = "text/javascript";a.async = !0;a.src = "undefined" !== typeof MIXPANEL_CUSTOM_LIB_URL ? MIXPANEL_CUSTOM_LIB_URL : "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";e = f.getElementsByTagName("script")[0];e.parentNode.insertBefore(a, e)}})(document, window.mixpanel || []);
|
||||
mixpanel.init(window.env.MP_ID);
|
||||
|
||||
script(type='text/javascript').
|
||||
mixpanel.track("Landing Page");
|
||||
|
||||
body(ng-controller='AuthCtrl')
|
||||
include ./login-modal
|
||||
|
||||
@@ -27,6 +27,11 @@ html(ng-app='habitrpg')
|
||||
//FIXME for some reason this won't load when in footerCtrl.js#deferredScripts()
|
||||
script(type="text/javascript", src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5016f6cc44ad68a4", async="async")
|
||||
|
||||
script(type='text/javascript').
|
||||
(function (f, b) {if (!b.__SV) {var a, e, i, g;window.mixpanel = b;b._i = [];b.init = function (a, e, d) {function f(b, h) {var a = h.split(".");2 == a.length && (b = b[a[0]], h = a[1]);b[h] = function () {b.push([h].concat(Array.prototype.slice.call(arguments, 0)))}}var c = b;"undefined" !== typeof d ? c = b[d] = [] : d = "mixpanel";c.people = c.people || [];c.toString = function (b) {var a = "mixpanel";"mixpanel" !== d && (a += "." + d);b || (a += " (stub)");return a};c.people.toString = function () {return c.toString(1) + ".people (stub)"};i = "disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.union people.track_charge people.clear_charges people.delete_user".split(" ");
|
||||
for (g = 0; g < i.length; g++)f(c, i[g]);b._i.push([a, e, d])};b.__SV = 1.2;a = f.createElement("script");a.type = "text/javascript";a.async = !0;a.src = "undefined" !== typeof MIXPANEL_CUSTOM_LIB_URL ? MIXPANEL_CUSTOM_LIB_URL : "//cdn.mxpnl.com/libs/mixpanel-2-latest.min.js";e = f.getElementsByTagName("script")[0];e.parentNode.insertBefore(a, e)}})(document, window.mixpanel || []);
|
||||
mixpanel.init(window.env.MP_ID);
|
||||
|
||||
!= env.getManifestFiles("static")
|
||||
|
||||
body
|
||||
|
||||
Reference in New Issue
Block a user