Skip to content

Instantly share code, notes, and snippets.

@pboling
Last active March 24, 2020 21:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pboling/94200093e8a94283a81b2d923921c0b7 to your computer and use it in GitHub Desktop.
Save pboling/94200093e8a94283a81b2d923921c0b7 to your computer and use it in GitHub Desktop.
var isDev = false;
if (window.__env.NODE_ENV === 'development') {
isDev = true;
}
if (isDev) {
var MixpanelMock;
MixpanelMock = (function() {
function MixpanelMock() {
this.init = function() {
console.log("mixpanel.init", arguments);
}
this.track = function() {
console.log("mixpanel.track", arguments);
}
}
return MixpanelMock;
})();
window.mixpanel = new MixpanelMock();
@jiehan1029
Copy link

Thanks for the gist! very helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment