Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
496 B
2
Indexable
private handleMixPanel(u: IUser, isCreated: boolean) {

    mixpanel.identify(u.ID);

    if (isCreated) {
      mixpanel.track("Signed Up");
    }

    mixpanel.people.set({
      $name: u.Name,
      $email: u.Email,
      "Sign up date": u.DateJoined.toLocaleString(),
      USER_ID: u.ID,
      "Apply Coins": u.Tokens,
      "In Editor Hide Forever": u.DidEditorTutorial,
      "TOS Accepted": u.DidAcceptTOS,
    });
    mixpanel.register({ "Apply Coins": u.Tokens });
  }