How to use the mixpanel-browser.alias function in mixpanel-browser

To help you get started, we’ve selected a few mixpanel-browser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github daostack / alchemy / src / lib / analytics.ts View on Github external
alias: (id: string) => {
    if (doTracking) { Mixpanel.alias(id); }
  },
  reset: () => {
github mapseed / platform / src / base / static / utils / mixpanel.js View on Github external
alias: id => {
    if (envCheck) mixpanel.alias(id);
  },
  track: (name, props) => {
github Lumeer / web-ui / src / app / core / guards / current-user.guard.ts View on Github external
map(user => {
        if (!user.agreement) {
          this.authService.saveLoginRedirectPath(state.url);
          this.router.navigate(['/', 'agreement']);

          if (environment.analytics && environment.mixpanelKey) {
            const userHash = hashUserId(user.id);
            mixpanel.alias(userHash);
            mixpanel.identify(userHash);
          }
        } else {
          if (environment.analytics && environment.mixpanelKey) {
            const userHash = hashUserId(user.id);
            mixpanel.identify(userHash);
          }
        }

        return user.agreement;
      })
    );