npm mixpanel-browser 2.45.0
In-app notifications removal, configurable error-reporting

latest releases: 2.51.0, 2.50.0, 2.49.0...
2 years ago

All code relating to in-app notifications has been removed, as the "Messages & Experiments" product is now entirely inactive after a 1.5 year deprecation cycle. The only noticeable changes should be:

  • The SDK no longer makes network calls to the /decide API endpoint.
  • The gzipped size of the minified full SDK is now 17435 bytes.

There is now also support for surfacing SDK errors/warnings via the error_reporter configuration option. Exceptions and error messages which the SDK catches and handles will be passed to your handler function if supplied, e.g.:

mixpanel.init('my token', {
  error_reporter: function(msg, err) {
    Rollbar.warn(msg, err); // send to your 3rd-party error monitor
    console.error(...arguments); // blow up your dev console locally
  },
});

The err argument is an Error object preserving the stack. Note that errors that make it to the user-configured reporter are generally already handled by the SDK and should be used just for informational/debugging/monitoring purposes (e.g., "Error; retry in 10000 ms" is the batch/retry system responding to a network failure). Some errors are informative for uncovering implementation issues, e.g. "No event name provided to mixpanel.track".

Several fixes are included in this release:

  • Several var declarations were missing for the asynchronous HTML "snippet" loader (#215)
  • Some edge cases of the batch/retry system have been fixed that could cause many extraneous network requests (primarily in cases where localStorage becomes unusable after an event has already been queued).

Don't miss a new mixpanel-browser release

NewReleases is sending notifications on new releases.