Mixpanel React Native Versions Save

Official React Native Tracking Library for Mixpanel Analytics

v3.0.3

1 week ago

v3.0.3 (2024-05-10)

Enhancements

  • bump iOS to 4.2.7 #249
  • Require only the used subset of AsnycStorage as custom storage #246
  • Fix CI issues for both iOS and Android and update the sample app #241
  • Version bump Android SDK to 7.5.2 #237

Fixes

  • fix: fix adapter storage jest setup #244
  • fix storage adapter info being logged on every app launch #239
  • Added null check for empty constants object incase of web #238

v3.0.2

1 month ago

v3.0.2 (2024-04-16)

Fixes

  • Avoid crash if AsyncStorage is null #235

v3.0.1

1 month ago

v3.0.1 (2024-04-11)

Fixes

  • Replace the MixpanelReactNative with mixpanelImpl and bump native versions #231

Closed issues:

  • Expo managed workflow support #82
  • Feature request: Support react-native-web #24

v3.0.0

1 month ago

v3.0.0 (2024-04-09)

This is the official release for Expo and React Native Web support. For more details, please refer to the release notes for versions 3.0.0-beta.2 and 3.0.0-beta.1.

Enhancements

  • bump ios version to 4.2.4 #228

v3.0.0-beta.2

2 months ago

v3.0.0-beta.2 (2024-03-06)

Enhancements

  • Add support to use custom storage instead of @react-native-async-storage/async-storage.(https://github.com/mixpanel/mixpanel-react-native/pull/225) When JavaScript mode is enabled, Mixpanel utilizes AsyncStorage to persist data. If you prefer not to use it, or if AsyncStorage is unavailable in your target environment, you can import or define a different storage class. However, it must follow the same interface as AsyncStorage The following example demonstrates how to use a custom storage solution:
const MyAsyncStorage = require("@my-org/<library-path>/AsyncStorage"); // or your own storage class
const trackAutomaticEvents = false;
const useNative = false;
const mixpanel = new Mixpanel('YOUR_TOKEN', trackAutomaticEvents, useNative, MyAsyncStorage);
mixpanel.init();

Fixes

v2.4.1

2 months ago

v2.4.1 (2024-03-01)

Fixes

  • Fix mp_lib(Mixpanel Library) not being set as react-native

v3.0.0-beta.1

2 months ago

v3.0.0-beta.1 (2024-02-29)

Expo and React Native Web support

This version(PR #223) introduces support for Expo, React Native Web, and any platform using React Native that does not support iOS and Android. To activate this, initialize Mixpanel with an additional parameter useNative set to false, which will enable JavaScript mode. Currently in beta, we plan to iterate on this to address any issues and add more features. We welcome your feedback.

 const trackAutomaticEvents = false;
 const useNative = false;
 const mixpanel = new Mixpanel(
    "YOUR_MIXPANEL_TOKEN",
    trackAutomaticEvents,
    useNative
  );
 mixpanel.init();

To try the Expo sample app, navigate to Samples/MixpanelExpo, run npm install, and then execute npm run ios or npm run android

To use it in your existing project, please:

npm install mixpanel-react-native@beta
npm install @react-native-async-storage/async-storage

or

yarn add mixpanel-react-native@beta
yarn add @react-native-async-storage/async-storage

When JavaScript mode is enabled, Mixpanel utilizes AsyncStorage to persist data. If you prefer not to use it, or if AsyncStorage is unavailable in your target environment, you can import or define a different storage class. However, it must follow the same interface as AsyncStorage The following example demonstrates how to use a custom storage solution:

const MyAsyncStorage = require("@my-org/<library-path>/AsyncStorage"); // or your own storage class
const trackAutomaticEvents = false;
const useNative = false;
const mixpanel = new Mixpanel('YOUR_TOKEN', trackAutomaticEvents, useNative, MyAsyncStorage);
mixpanel.init();

Known limitations and differences compared to the native mode (iOS/Android):

  • Automatic Events are currently not supported in this mode. Setting 'trackAutomaticEvents' to 'true' will have no effect.
  • Certain Mixpanel Properties are unavailable in Javascript mode, including detailed information about the device and screen.
  • The default flush interval is set to 10 seconds. The data will not flush automatically when the app moves to the background. We recommend flushing more frequently for key events.

v2.4.0

5 months ago

v2.4.0 (2023-12-02)

Enhancements

  • add api: setFlushBatchSize #219
  • RN 73 support for Android with AGP 8 required #215

v2.3.1

10 months ago

v2.3.1 (2023-06-20)

Fixes

  • fix typo in the identify function resolve #205

v2.3.0

11 months ago

v2.3.0 (2023-06-16)

Enhancements

  • Returning Promise for the identify() to avoid race condition #200

Fixes

  • Fix null reference used for synchronization (monitor-enter) #199
  • fix initialize was called with 4 arguments but expects 5 arguments #198
  • safer handling of super properties #197
  • Android resource linking failure fix #187