How to use the mixpanel-browser.people 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 pursuit-gg / pursuit-client / src / actions / user.js View on Github external
function authSuccess(json, signUp) {
  mixpanel.identify(json.data.id);
  mixpanel.people.set({
    $user_id: json.data.id,
    $username: json.data.username,
    $email: json.data.email,    // only special properties need the $
    $created: json.data.created_at,
    $last_login: new Date(),         // properties can be dates...
  });
  mixpanel.register({
    username: json.data.username,
    user_id: json.data.id,
  });
  return {
    type: AUTH_SUCCESS,
    user: json.data,
    client: json.client,
    accessToken: json.accessToken,
    uid: json.uid,
github web-pal / chronos-timetracker / app / utils / stat.js View on Github external
export const incrementMixpanel = (event, data) => {
  if (process.env.DISABLE_MIXPANEL !== '1' && process.env.MIXPANEL_API_TOKEN) {
    try {
      mixpanel.people.increment(event, data);
    } catch (err) {
      console.error(err);
    }
  }
};
github pursuit-gg / pursuit-client / src / containers / HomePage / HomePage.js View on Github external
componentDidMount() {
    mixpanel.track(MP_FORTNITE_CLIENT_LOAD, {});
    mixpanel.people.set({
      open_on_startup: this.props.settings.launchOnStartup,
      minimize_on_startup: this.props.settings.minimizeOnStartup,
      minimize_to_tray: this.props.settings.minimizeToTray,
      upload_bandwidth: this.props.settings.uploadBandwidth,
      obs_mode: this.props.settings.pendingExternalOBSCapture,
      match_processed_sound: this.props.settings.matchProcessedSound,
      notifications_badge: this.props.settings.notificationsBadge,
      manual_upload_notifications: this.props.settings.manualUploadNotifications,
      auto_upload: this.props.settings.manualCaptureUpload,
    });
  }
github daostack / alchemy / src / lib / analytics.ts View on Github external
set: (props: any) => {
      if (doTracking) { Mixpanel.people.set(props); }
    },
  },
github pursuit-gg / pursuit-client / src / containers / OnboardingPage / OnboardingPage.js View on Github external
goToHome: (uploadBandwidth) => {
    mixpanel.track(MP_USER_SETTING_CHANGE, { setting: 'upload_bandwidth', before: 0, after: uploadBandwidth });
    mixpanel.people.set({ upload_bandwidth: uploadBandwidth });
    dispatch(setUploadBandwidth(uploadBandwidth));
    dispatch(setOnboardingComplete(true));
    dispatch(push('/home'));
  },
});
github pursuit-gg / pursuit-client / src / containers / RequireAuthContainer / RequireAuthContainer.js View on Github external
componentWillMount() {
    this.checkAuth(this.props);
    if (this.props.isAuthenticated) {
      ipcRenderer.send('set-spectator-mode', this.props.spectator);
      ipcRenderer.send('sign-in', this.props.user.id);
      mixpanel.identify(this.props.user.id);
      mixpanel.people.set({
        $username: this.props.user.username,
        $email: this.props.user.email,
      });
      mixpanel.register({
        username: this.props.user.username,
        user_id: this.props.user.id,
      });
      if (this.props.user.hasTeamAccess) {
        this.props.loadTeam();
      }
      this.props.loadMatchNotifications();
      this.fetchInterval = this.props.setInterval(() => {
        this.props.loadMatchNotifications();
      }, 15000);
      this.props.clearCaptureError();
    }
github streamlit / streamlit / frontend / src / lib / remotetracking.ts View on Github external
export function initRemoteTracker({gatherUsageStats, email}: {gatherUsageStats?: boolean; email?: string}): void {
  if (gatherUsageStats != null) {
    trackUsage = gatherUsageStats
  }

  if (trackUsage) {
    mixpanel.identify(INSTALLATION_ID)
    if (email) {
      logMessage(`Email: ${email}`)
      mixpanel.people.set({
        '$email': email,
        '$created': new Date().toISOString(),
      })
    }
    mixpanel.opt_in_tracking()
  } else {
    mixpanel.opt_out_tracking()
  }

  logAlways('Track stats remotely: ', trackUsage)

  preInitializationEventQueue.forEach(([eventName, opts]) => {
    trackEventRemotely(eventName, opts)
  })
}
github web-pal / chronos-timetracker / app / sagas / initializeApp.js View on Github external
function identifyInSentryAndMixpanel(host: string, userData: any): void {
  if (process.env.DISABLE_MIXPANEL !== '1') {
    mixpanel.identify((`${host} - ${userData.emailAddress}`));
    mixpanel.people.set({
      host,
      version,
      locale: userData.locale,
      $timezone: userData.timeZone,
      $name: userData.displayName,
      $email: userData.emailAddress,
      $distinct_id: `${host} - ${userData.emailAddress}`,
    });
    Raven.setUserContext({
      host,
      locale: userData.locale,
      timeZone: userData.timeZone,
      name: userData.displayName,
      email: userData.emailAddress,
    });
  }
github pursuit-gg / pursuit-client / src / containers / SettingsPage / SettingsPage.js View on Github external
onChange={() => {
                    ipcRenderer.send('set-startup-settings', !launchOnStartup, minimizeOnStartup);
                    this.props.setLaunchOnStartup(!launchOnStartup);
                    mixpanel.track(MP_USER_SETTING_CHANGE, { setting: 'open_on_startup', before: launchOnStartup, after: !launchOnStartup });
                    mixpanel.people.set({ open_on_startup: !launchOnStartup });
                  }}
                />
github pursuit-gg / pursuit-client / src / containers / SettingsPage / SettingsPage.js View on Github external
onChange={() => {
                    ipcRenderer.send('set-notifications-badge', !notificationsBadge);
                    this.props.setNotificationsBadge(!notificationsBadge);
                    mixpanel.track(MP_USER_SETTING_CHANGE, { setting: 'notifications_badge', before: notificationsBadge, after: !notificationsBadge });
                    mixpanel.people.set({ notifications_badge: !notificationsBadge });
                  }}
                />