Skip to content

Releases: mixpanel/mixpanel-js

Fixes and minor updates

18 Jul 22:30
Compare
Choose a tag to compare
  • get_api_host() is now used consistently across the SDK to ensure that per-endpoint API host configs are respected everywhere
  • A fix is included for the ordering of (asynchronous) operations when calling mixpanel.reset() while a session recording is active
  • Default Feature Flag context now includes device_id alongside distinct_id
  • $experiment_started events now include several API-latency-tracking properties

Fine-grained API host configuration and session recording fixes

08 Jul 22:28
Compare
Choose a tag to compare

A new api_hosts configuration option enables different endpoints (events, profiles, groups, session recordings) to be sent to different hosts, for selective proxying, e.g.:

mixpanel.init('<TOKEN>', {
  api_hosts: {
    // proxy only session-recording requests, and leave the rest on the default host api-js.mixpanel.com
    'record': 'https://my-proxy.com',
  },
});

This release also fixes a race condition when calling mixpanel.reset() while a session recording is active, and adds an initial TypeScript types.d.ts file.

Updates to revenue, session recording, autocapture, etc

20 May 15:24
Compare
Choose a tag to compare

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 optionapi_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

01 Apr 16:52
Compare
Choose a tag to compare

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

26 Mar 21:11
Compare
Choose a tag to compare
  • 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

14 Mar 23:51
Compare
Choose a tag to compare
  • 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

11 Mar 20:11
Compare
Choose a tag to compare
  • 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

06 Mar 23:24
Compare
Choose a tag to compare

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

20 Feb 23:05
Compare
Choose a tag to compare

New Contributors

Full Changelog: v2.59.0...v2.60.0

v2.59.0

20 Feb 23:04
Compare
Choose a tag to compare
  • Block more crawlers (AmazonBot, more Yandex bots)

Full Changelog: v2.58.0...v2.59.0