Releases: mixpanel/mixpanel-js
Releases Β· mixpanel/mixpanel-js
Updates to revenue, session recording, autocapture, etc
This release packages up changes and improvements to several subsystems:
- The long-deprecated
mixpanel.people.track_charge()
method now only prints a console error and no longer sets a profile property or produces any other change. The old version of Mixpanel's Revenue analysis UI has been replaced by a newer suite of analysis tools which don't depend on profile properties (see https://docs.mixpanel.com/docs/features/revenue_analytics). - Autocapture click tracking properties now include page height and width.
- Session recording now stops when
mixpanel.reset()
is called. - New init option
api_extra_query_params
adds support for appending arbitrary query string params to tracking requests (useful for non-standard proxy setups) - The API of the Feature Flagging system (under development) has been revised
- Whale Browser is now detected automatically
Dependency and build upgrades
This release upgrades session-recording library rrweb to the latest alpha version. In conjunction, the SDK's build process has been refactored and Closure Compiler updated.
Native UUID and JSON serialization
- UUIDs are now generated as UUIDv4. When available, the native randomUUID() from the Crypto API is used; otherwise the library falls back to a simple custom UUIDv4 implementation.
- When available, the library now consistently uses native
JSON.stringify()
for serializing request data, only falling back to the older custom JSON encoding implementation if the environment doesn't have native JSON APIs. - Fixes a Session Recording race condition where sometimes the idle timeout is reset past when it should have fired due to a backgrounded tab.
Revert event/user queue throttling
- Removes 10ms throttle of event / user data queueing that was added in 2.61.0. The additional 10ms regressed the reliability of firing tracking updates when a page is about to unload.
Session Recording Fixes & Reliability
- Stops recording when the initial full snapshot of the DOM fails to generate, preventing the ingestion of blank recordings
- Try/catch rrweb's
record
to prevent any user facing errors - Fix broken opt-out check that was spamming error messages when
debug
mode is on (introduced in 2.61.0)
Session recording continuation across page loads
This release focuses on continuing an active session recording across HTML page loads (different mixpanel.init() calls)
- Session recordings are now persisted and continue recording across HTML page loads in a single tab
- Session recording now uses IndexedDB when available to queue and persist data for reliability under poor network conditions etc.
v2.60.0
- Autocapture support. See: https://docs.mixpanel.com/docs/tracking-methods/autocapture
- prevent duplicate values in cookie storage when using union #354 by @chrisdeely in #459
New Contributors
- @chrisdeely made their first contribution in #459
Full Changelog: v2.59.0...v2.60.0
v2.59.0
- Block more crawlers (AmazonBot, more Yandex bots)
Full Changelog: v2.58.0...v2.59.0
Session recording features
- New initialization option
record_canvas
can be turned on to enable the Session Recording module to capture contents of HTMLcanvas
elements - Session Replay checkpoint events now include a starting URL
Internal refactor for Promise support
This release is largely an internal refactor of the batch/queue/retry subsystem introducing asynchronous abstractions (primarily Promise support). Includes a minimal Promise polyfill for continued support in older browsers.