Releases: mixpanel/mixpanel-js
v2.9.16
SVG fixes for Autotrack
Fixes the automatic tracking of clicks on inner SVG elements.
Fix `cookie.set`
Fixes an issue we introduced in v2.9.0 where the cookie would be set for seconds instead of days. For example, if the intention had been to set the cookie for 365 days, it would have only been set for 365 seconds.
more robust logout code
Fixes an issue with the reset()
function introduced in v2.8.0. After calling reset()
, mixpanel.people
methods would keep sending for the previous distinct_id
rather than queueing until the next identify()
call.
v2.8.0: misc. improvements
track_links()
andtrack_forms()
can now take raw elements or element lists in addition to query selectors- add
reset()
method to handle logout flow (thanks @stefansedich) - catch exceptions during
_send_request()
(thanks @feychenie) - fix user agent detection/reporting for Chrome iOS and Firefox iOS
Better support for NPM installation
The library can now be installed into a project with npm install --save mixpanel-browser
and loaded via require('mixpanel-browser')
. Further instructions are available in the README.
Support for blacklisting properties
Blacklisted properties will not be sent with calls to track()
, even those registered as superproperties or normally sent by default by the library. The list is specified with the property_blacklist
configuration option, e.g.:
mixpanel.init('MYTOKEN', {
property_blacklist: ['$referrer', 'custom_property']
});
Support for synchronous/module-based loading
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.
Better Windows Phone detection
Also enabled JavaScript strict mode in preparation for ES2015 modularization. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
Embed code fix
Edge-case fix for loading the SDK from a custom location via relative URL