I\'m attempting to make use of Mixpanel event tracking in a single page site based on Backbone.js and require.js.
Looking at the snippet that Mixpanel provide for cut-an
As of mixpanel's 2.7.x release, they now support multiple AMD/UMD versions compatible with requirejs, you can grab it on their github page: https://github.com/mixpanel/mixpanel-js
requirejs(['./mixpanel.amd'], function(mixpanel) {
mixpanel.init("FAKE_TOKEN", {
debug: true,
loaded: function() {
mixpanel.track('loaded() callback works but is unnecessary');
alert("Mixpanel loaded successfully via RequireJS/AMD");
}
});
mixpanel.track('Tracking after mixpanel.init');
});