How to use the mixpanel-browser.track 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 DataTurks / DataTurks / bazaar / src / helpers / dthelper.js View on Github external
export const logEvent = (category, action, label) => {
  try {
    if (label) {
      ReactGA.event({
        category,
        action,
        label
      });
      mixpanel.track(action);
    } else {
      ReactGA.event({
        category,
        action
      });
      mixpanel.track(action);
    }
  } catch (exception) {
    // statements
    console.log(exception);
  }
};
github Broaden-io / Broaden-io-client / src / components / EditProfile.js View on Github external
componentDidMount() {
    mixpanel.init('333f6269317ae9b78a29c535e29f00bf')
    mixpanel.track("Edit Profile Page");
  }
github streamlit / streamlit / frontend / src / lib / remotetracking.ts View on Github external
const data = {
    ...opts,
    browserIpAddress: BROWSER_IP_ADDRESS,
    dev: IS_DEV_ENV,
    source: 'browser',
    streamlitVersion: STREAMLIT_VERSION,
  }

  if (IS_DEV_ENV) {
    logAlways(
      `${trackUsage ? '' : 'NOT '}Tracking stat datapoint: `,
      eventName, data)
  }

  if (trackUsage !== false) {
    mixpanel.track(eventName, data)
  }
}
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 Lumeer / web-ui / src / app / auth / auth.service.ts View on Github external
private trackUserLogin() {
    if (!environment.analytics) {
      return;
    }

    this.angulartics2.eventTrack.next({
      action: 'User login',
      properties: {category: 'User Actions'},
    });

    if (environment.mixpanelKey) {
      mixpanel.track('User Login');
    }
  }
github Lumeer / web-ui / src / app / app.component.ts View on Github external
.subscribe(([user, limits]) => {
        const userIdHash = hashUserId(user.id);
        const signUpDate = dateToMonthYear(user.agreementDate);
        const serviceLevel: string = limits ? limits.serviceLevel : ServiceLevelType.FREE;

        this.setAnalyticsUsername(userIdHash);
        this.setAnalyticsDimensions(serviceLevel, signUpDate);

        this.configureSentryUserScope(userIdHash);

        if (environment.mixpanelKey) {
          mixpanel.track('Application Started');
        }
      });
  }
github nickpwhite / Beatnik / reactjs / src / Converter.js View on Github external
updateMusic(music) {
    if (music.length > 0) {
      mixpanel.track("Load Music", music[0].fields);
    }
    this.setState({ 
      loading: false,
      music: music 
    });
  }
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 pursuit-gg / pursuit-client / src / components / ProfileHeader / ProfileHeader.js View on Github external
ipcRenderer.on('update-downloaded', () => {
      this.props.setUpdateAvailable(true);
      mixpanel.track('Update - Downloaded', {
        current_version: appVersion,
      });
    });
    ipcRenderer.on('update-not-available', () => {