npm mixpanel-browser 2.43.0
Support for non-base64 request payloads

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

The new api_payload_format configuration option controls whether request payloads are base64-encoded before sending (base64 option) or sent as plain JSON (json option).

When the tracking server (api_host) is Mixpanel's own API servers (*.mixpanel.com), this value now defaults to json. This setting reduces payload size, simplifies inspection of request content with browser dev tools, and supports emoji content πŸ”₯ seamlessly:

mixpanel.track('Signed up πŸ‘', {name: 'πŸ‘ΎπŸ’»πŸ‘ΎπŸ’»πŸ‘Ύ'});

For backwards compatibility with proxy server implementations, if api_host is NOT a mixpanel.com server, then the default format remains base64. To force plain JSON encoding with a custom proxy host, initialize with option {api_payload_format: 'json'}.

Don't miss a new mixpanel-browser release

NewReleases is sending notifications on new releases.