Skip to content

Instantly share code, notes, and snippets.

@pboling
Last active Mar 24, 2020
Embed
What would you like to do?
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

jiehan1029 commented Feb 20, 2019

Thanks for the gist! very helpful

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