Skip to content

Instantly share code, notes, and snippets.

@daveknapik
Created June 9, 2015 21:29
Show Gist options
  • Save daveknapik/b77a477b94d147c1b8dd to your computer and use it in GitHub Desktop.
Save daveknapik/b77a477b94d147c1b8dd to your computer and use it in GitHub Desktop.
mixpanel mock
<script type="text/javascript">
function MixPanelMock() {
this.track = track;
this.alias = alias;
this.identify = identify;
this.people = new People();
function track(eventString) {
console.log(eventString);
}
function alias(id) {
console.log(id);
}
function identify(id) {
console.log(id);
}
function People() {
this.set = set;
function set(attributes) {
console.log(attributes);
}
}
}
window.mixpanel = new MixPanelMock();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment