How to use the mixpanel-browser.reset 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 Opentrons / opentrons / app / src / analytics / mixpanel.js View on Github external
export function setMixpanelTracking(config: AnalyticsConfig) {
  if (MIXPANEL_ID) {
    if (config.optedIn) {
      log.debug('User has opted into analytics; tracking with Mixpanel')
      mixpanel.identify(config.appId)
      mixpanel.opt_in_tracking()
      mixpanel.register({ appVersion: CURRENT_VERSION, appId: config.appId })
    } else {
      log.debug('User has opted out of analytics; stopping tracking')
      mixpanel.opt_out_tracking()
      mixpanel.reset()
    }
  }
}
github daostack / alchemy / src / lib / analytics.ts View on Github external
reset: () => {
    if (doTracking) { Mixpanel.reset(); }
  },
  track: (name: string, props = {}) => {
github pursuit-gg / pursuit-client / src / actions / user.js View on Github external
(dispatch) => {
    mixpanel.reset();
    dispatch(clearUserAuth());
    dispatch(resetStateOnLogout());
    dispatch(push('/welcome'));
  }
);