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;

View file

@ -42,7 +42,7 @@
<input type="password" class="form-control" placeholder="Create a password" ng-model="newUser.password" required>
<input type="password" class="form-control" placeholder="Verify your password" ng-model="newUser.repeatePassword" match="newUser.password" required>
<div class="form-group">
<button class="btn btn-lg btn-primary btn-block" ng-disabled="signupForm.$invalid" type="submit">Sign Up for Free!</button>
<button class="btn btn-lg btn-primary btn-block" ng-disabled="signupForm.$invalid" type="submit" analytics-on analytics-event="register">Sign Up for Free!</button>
<p class="help-block">No credit card required.</p>
</div>
</form>