mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
feat(analytics): "motivate yourself" 3 variants @lemoness
This commit is contained in:
@@ -120,6 +120,8 @@
|
|||||||
"mobileAndroid": "Android",
|
"mobileAndroid": "Android",
|
||||||
"mobileIOS": "iOS",
|
"mobileIOS": "iOS",
|
||||||
"motivate": "Motivate yourself and your team!",
|
"motivate": "Motivate yourself and your team!",
|
||||||
|
"motivate1": "Motivate yourself to do anything.",
|
||||||
|
"motivate2": "Get Organized. Get Motivated. Get Gold.",
|
||||||
"passConfirm": "Confirm Password",
|
"passConfirm": "Confirm Password",
|
||||||
"passMan": "In case you are using a password manager (like 1Password) and have problems logging in, try typing username and password manually.",
|
"passMan": "In case you are using a password manager (like 1Password) and have problems logging in, try typing username and password manually.",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl) {
|
|||||||
// Google Analytics, only in production
|
// Google Analytics, only in production
|
||||||
if (window.env.NODE_ENV === 'production') {
|
if (window.env.NODE_ENV === 'production') {
|
||||||
// Get experiments API
|
// Get experiments API
|
||||||
$.getScript('//www.google-analytics.com/cx/api.js?experiment=pi26hZ3rRFaEPNiKqXbhqA', function(){
|
$.getScript('//www.google-analytics.com/cx/api.js?experiment=t-AFggRWQnuJ6Teck_x1-Q', function(){
|
||||||
$rootScope.variant = cxApi.chooseVariation();
|
$rootScope.variant = cxApi.chooseVariation();
|
||||||
$rootScope.$apply();
|
$rootScope.$apply();
|
||||||
|
|
||||||
|
|||||||
@@ -185,13 +185,14 @@ function($rootScope, User, $timeout, $state) {
|
|||||||
var showFinish = step.final || k == 'classes';
|
var showFinish = step.final || k == 'classes';
|
||||||
var showCounter = k=='intro' && !step.final;
|
var showCounter = k=='intro' && !step.final;
|
||||||
|
|
||||||
$rootScope.variant=2; // temporarily set finish & counter on until we can get experiment working
|
|
||||||
|
|
||||||
// Experiment wud1Ba5qT1m9qR3PP0-Mmg , remove this when experiment complete
|
// Experiment wud1Ba5qT1m9qR3PP0-Mmg , remove this when experiment complete
|
||||||
// 0=No Finish; Yes Counter 1=No Finish; No Counter 2=Yes Finish; Yes Counter 3=Yes Finish; No Counter
|
// 0=No Finish; Yes Counter 1=No Finish; No Counter 2=Yes Finish; Yes Counter 3=Yes Finish; No Counter
|
||||||
showFinish = showFinish || $rootScope.variant==2 || $rootScope.variant==3;
|
showFinish = showFinish || $rootScope.variant==2 || $rootScope.variant==3;
|
||||||
showCounter = showCounter && ($rootScope.variant==0 || $rootScope.variant==2);
|
showCounter = showCounter && ($rootScope.variant==0 || $rootScope.variant==2);
|
||||||
|
|
||||||
|
// FIXME temporarily set finish & counter on until we can get experiment working
|
||||||
|
showFinish=true;showCounter=true;
|
||||||
|
|
||||||
return '<div class="popover" role="tooltip">' +
|
return '<div class="popover" role="tooltip">' +
|
||||||
'<div class="arrow"></div>' +
|
'<div class="arrow"></div>' +
|
||||||
'<h3 class="popover-title"></h3>' +
|
'<h3 class="popover-title"></h3>' +
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ html(ng-app='habitrpg', ng-controller='RootCtrl')
|
|||||||
li
|
li
|
||||||
button#header-play-button.btn.btn-primary.navbar-btn.navbar-right(ng-click='playButtonClick()')= env.t('playButtonFull')
|
button#header-play-button.btn.btn-primary.navbar-btn.navbar-right(ng-click='playButtonClick()')= env.t('playButtonFull')
|
||||||
#intro
|
#intro
|
||||||
h1= env.t('motivate')
|
h1(ng-cloak) {{ variant==0 ? "#{env.t('motivate')}" : (variant==1 ? "#{env.t('motivate1')}" : "#{env.t('motivate2')}") }}
|
||||||
img.center-block.img-responsive(src='https://s3.amazonaws.com/habitrpg-assets/front/images/intro.png')
|
img.center-block.img-responsive(src='https://s3.amazonaws.com/habitrpg-assets/front/images/intro.png')
|
||||||
// insert intro images
|
// insert intro images
|
||||||
.introcall.bg-success
|
.introcall.bg-success
|
||||||
|
|||||||
Reference in New Issue
Block a user