Four pre-built release types are now available in the build/
dir:
mixpanel.globals.js
: the standard "global var" build. Attachesmixpanel
object towindow
, requires loading via asynchronous embed code (snippet)mixpanel.amd.js
: for loading via AMD/RequireJSmixpanel.cjs.js
: for loading with a CommonJS loader such as Webpack or Browserifymixpanel.umd.js
: UMD build, both AMD- and CJS-compatible
Additionally, those who already compile/bundle from ES2015 source can load mixpanel
directly from source in src/loader-module.js
(import mixpanel from 'mixpanel/src/loader-module';
).
Usage examples are available in the examples/
dir.