Track users across registration. Send people analytics with a created date on first registration.
This commit is contained in:
parent
810b711fc4
commit
5d977f5299
2 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
|
|
Reference in a new issue