Track users across registration. Send people analytics with a created date on first registration.

This commit is contained in:
yackob03 2013-10-08 11:50:34 -04:00
parent 810b711fc4
commit 5d977f5299
2 changed files with 9 additions and 1 deletions

View file

@ -160,6 +160,14 @@ function LandingCtrl($scope, $timeout, Restangular, UserService) {
newUserPost.customPOST($scope.newUser).then(function() {
$scope.awaitingConfirmation = true;
$scope.registering = false;
mixpanel.alias($scope.newUser.username);
mixpanel.people.set_once({
'$email': $scope.newUser.email,
'$username': $scope.newUser.username,
'$created': new Date(),
'verified': false
});
}, function(result) {
$scope.registering = false;
$scope.registerError = result.data.message;