mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-20 20:58:51 +00:00
Merge branch 'develop' of https://github.com/HabitRPG/habitrpg into develop
This commit is contained in:
commit
aaa230790b
5 changed files with 12 additions and 15 deletions
|
|
@ -189,10 +189,7 @@ window.habitrpg = angular.module('habitrpg',
|
|||
})
|
||||
.state('options.settings.subscription', {
|
||||
url: "/subscription",
|
||||
templateUrl: "partials/options.settings.subscription.html",
|
||||
onEnter: function(){
|
||||
window.ga && ga('send', 'event', 'page', 'view', 'Basic Subscription');
|
||||
}
|
||||
templateUrl: "partials/options.settings.subscription.html"
|
||||
})
|
||||
|
||||
var settings = JSON.parse(localStorage.getItem(STORAGE_SETTINGS_ID));
|
||||
|
|
|
|||
|
|
@ -13,6 +13,11 @@ habitrpg.controller("RootCtrl", ['$scope', '$rootScope', '$location', 'User', '$
|
|||
})
|
||||
$rootScope.$on('userUpdated',initSticky);
|
||||
|
||||
$rootScope.$on('$stateChangeSuccess',
|
||||
function(event, toState, toParams, fromState, fromParams){
|
||||
if (!!fromState.name) window.ga && ga('send', 'pageview', {page: '/#/'+toState.name});
|
||||
});
|
||||
|
||||
$rootScope.User = User;
|
||||
$rootScope.user = user;
|
||||
$rootScope.moment = window.moment;
|
||||
|
|
|
|||
|
|
@ -6,14 +6,8 @@ window.habitrpgStatic = angular.module('habitrpgStatic', ['notificationServices'
|
|||
.constant("STORAGE_SETTINGS_ID", 'habit-mobile-settings')
|
||||
.constant("MOBILE_APP", false)
|
||||
|
||||
habitrpgStatic.controller("PlansCtrl", ['$rootScope', '$location', '$timeout',
|
||||
function($rootScope, $location, $timeout) {
|
||||
|
||||
// GA goal-tracking
|
||||
$timeout(function(){
|
||||
window.ga && ga('send', 'event', 'page', 'view', 'Plans');
|
||||
});
|
||||
|
||||
habitrpgStatic.controller("PlansCtrl", ['$rootScope',
|
||||
function($rootScope) {
|
||||
$rootScope.clickContact = function(){
|
||||
window.ga && ga('send', 'event', 'button', 'click', 'Contact Us (Plans)');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ var async = require('async');
|
|||
var utils = require('../utils');
|
||||
var nconf = require('nconf');
|
||||
var User = require('../models/user').model;
|
||||
var ga = require('./../utils').ga;
|
||||
|
||||
var api = module.exports;
|
||||
|
||||
|
|
@ -88,6 +89,7 @@ api.registerUser = function(req, res, next) {
|
|||
};
|
||||
user = new User(newUser);
|
||||
user.save(cb);
|
||||
ga.event('register', 'Local').send()
|
||||
}
|
||||
], function(err, saved) {
|
||||
if (err) {
|
||||
|
|
@ -250,8 +252,7 @@ api.setupPassport = function(router) {
|
|||
}
|
||||
});
|
||||
user.save(cb);
|
||||
|
||||
|
||||
ga.event('register', 'Facebook').send()
|
||||
}
|
||||
], function(err, saved){
|
||||
if (err) return res.redirect('/static/front?err=' + err);
|
||||
|
|
|
|||
|
|
@ -461,7 +461,7 @@ _.each(shared.wrap({}).ops, function(op,k){
|
|||
if (err) return next(err);
|
||||
res.json(200,response);
|
||||
})
|
||||
})
|
||||
}, ga);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue