Skip to content

Instantly share code, notes, and snippets.

@humphreybc
Last active October 19, 2017 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save humphreybc/9ab2fe961faa2c00efd338773bc6b3d3 to your computer and use it in GitHub Desktop.
Save humphreybc/9ab2fe961faa2c00efd338773bc6b3d3 to your computer and use it in GitHub Desktop.
var events = [];
window.track = events.push.bind(events);
document.addEventListener("DOMContentLoaded", function() {
window.track = function(name) {
mixpanel.track(name)
};
events.forEach(mixpanel.track);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment