How to use the mixpanel-browser.disable 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 nlaz / flashcards-for-developers / src / index.js View on Github external
import config from "./config";
import mixpanel from "mixpanel-browser";
import MixpanelProvider from "react-mixpanel";
import { StripeProvider } from "react-stripe-elements";

import "primer-product/build/build.css";
import "primer-markdown/build/build.css";
import "rc-tooltip/assets/bootstrap.css";

import "./index.css";

mixpanel.init(config.mixpanelAnalyticsKey);

if (config.mixpanelAnalyticsKey === "DUMMY_MIXPANEL_TOKEN") {
	// Disable Mixpanel event tracking if dummy token is provided
	mixpanel.disable();
}

ReactDOM.render(
  
    
      
    
  ,
  document.getElementById("root"),
);
unregister();