From 070a927184bd02189ce53112ab84e20286a75636 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 10 Jul 2026 16:42:42 +0000 Subject: [PATCH] release: prepare analytics 3.5.0 --- CHANGELOG.md | 7 ++++ README.md | 2 +- docs/Mixpanel.html | 92 ++++++++++++++++++++++------------------- docs/MixpanelGroup.html | 16 +++---- docs/People.html | 26 ++++++------ docs/index.html | 41 +++++++----------- docs/index.js.html | 55 +++++++++++++++--------- 7 files changed, 128 insertions(+), 111 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fe729dd..3fe79922 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [v3.5.0](https://github.com/mixpanel/mixpanel-react-native/tree/v3.5.0) (2026-07-10) + +### Features +- Adds feature flag support to main SDK ([#434](https://github.com/mixpanel/mixpanel-react-native/pull/434)) + +[Full Changelog](https://github.com/mixpanel/mixpanel-react-native/compare/v3.4.0...v3.5.0) + ## [v3.4.0](https://github.com/mixpanel/mixpanel-react-native/tree/v3.4.0) (2026-06-15) ### Enhancements diff --git a/README.md b/README.md index a68f5d9d..931e3a6f 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Mixpanel React Native Library -##### _June 15, 2026_ - [v3.4.0](https://github.com/mixpanel/mixpanel-react-native/releases/tag/v3.4.0) +##### _July 10, 2026_ - [v3.5.0](https://github.com/mixpanel/mixpanel-react-native/releases/tag/v3.5.0) ## Table of Contents diff --git a/docs/Mixpanel.html b/docs/Mixpanel.html index 395dec0c..0ed41d2a 100644 --- a/docs/Mixpanel.html +++ b/docs/Mixpanel.html @@ -93,7 +93,7 @@

new Mixpanel<
Source:
@@ -161,8 +161,8 @@

flagsFeature Flags enable dynamic feature control and A/B testing capabilities. This property is lazy-loaded to avoid unnecessary initialization until first access. -

Native Mode Only: Feature flags are currently only available when using native mode -(iOS/Android). JavaScript mode (Expo/React Native Web) support is planned for a future release. +

Feature flags work in both native mode (iOS/Android) and JavaScript mode (Expo/React Native Web). +In JavaScript mode, use Flags#updateContext to update targeting context at runtime. @@ -210,7 +210,7 @@

flagsSee:
@@ -370,7 +370,7 @@
Parameters:
Source:
@@ -535,7 +535,7 @@
Parameters:
Source:
@@ -628,7 +628,7 @@

c
Source:
@@ -790,7 +790,7 @@

Parameters:
Source:
@@ -927,7 +927,7 @@
Parameters:
Source:
@@ -1043,7 +1043,7 @@

flushSource:
@@ -1139,7 +1139,7 @@

getDeviceI
Source:
@@ -1257,7 +1257,7 @@

getDisti
Source:
@@ -1440,7 +1440,7 @@

Parameters:
Source:
@@ -1540,7 +1540,7 @@

getPeopleSource:
@@ -1654,7 +1654,7 @@

get
Source:
@@ -1764,7 +1764,7 @@

ha
Source:
@@ -1935,7 +1935,7 @@

Parameters:
Source:
@@ -2158,7 +2158,10 @@
Parameters:
The base URL used for Mixpanel API requests. - Use "https://api-eu.mixpanel.com" for EU data residency. See setServerURL() + Must match your project's data residency region: + US (default): "https://api.mixpanel.com", + EU: "https://api-eu.mixpanel.com", + India: "https://api-in.mixpanel.com". See setServerURL() @@ -2339,7 +2342,8 @@
Properties
Context properties used for feature flag targeting. - Can include user properties, device properties, or any custom properties for flag evaluation. + Use the `custom_properties` key to nest targeting properties + (e.g., `context: { custom_properties: { user_tier: 'premium' } }`). Note: In native mode, context must be set during initialization and cannot be updated later. @@ -2388,7 +2392,7 @@
Properties
Source:
@@ -2450,8 +2454,10 @@
Examples
await mixpanel.init(false, {}, 'https://api.mixpanel.com', false, { enabled: true, context: { - platform: 'mobile', - app_version: '2.1.0' + custom_properties: { + platform: 'mobile', + app_version: '2.1.0' + } } }); @@ -2525,7 +2531,7 @@

optInTra
Source:
@@ -2617,7 +2623,7 @@

optOutT
Source:
@@ -2764,7 +2770,7 @@

Parameters:
Source:
@@ -2904,7 +2910,7 @@
Parameters:
Source:
@@ -3064,7 +3070,7 @@
Parameters:
Source:
@@ -3153,7 +3159,7 @@

resetSource:
@@ -3292,7 +3298,7 @@
Parameters:
Source:
@@ -3430,7 +3436,7 @@
Parameters:
Source:
@@ -3590,7 +3596,7 @@
Parameters:
Source:
@@ -3729,7 +3735,7 @@
Parameters:
Source:
@@ -3775,7 +3781,9 @@

setServer
Set the base URL used for Mixpanel API requests. Useful if you need to proxy Mixpanel requests. Defaults to https://api.mixpanel.com. -To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com +Must match your project's data residency region: +US (default): https://api.mixpanel.com, EU: https://api-eu.mixpanel.com, +India: https://api-in.mixpanel.com
@@ -3868,7 +3876,7 @@

Parameters:
Source:
@@ -4008,7 +4016,7 @@
Parameters:
Source:
@@ -4147,7 +4155,7 @@
Parameters:
Source:
@@ -4313,7 +4321,7 @@
Parameters:
Source:
@@ -4502,7 +4510,7 @@
Parameters:
Source:
@@ -4643,7 +4651,7 @@
Parameters:
Source:
@@ -4832,7 +4840,7 @@
Parameters:
Source:
@@ -4878,13 +4886,13 @@
Parameters:

- Documentation generated by JSDoc 4.0.5 on Fri Nov 07 2025 13:06:53 GMT-0800 (Pacific Standard Time) + Documentation generated by JSDoc 4.0.5 on Fri Jul 10 2026 16:42:42 GMT+0000 (Coordinated Universal Time)
diff --git a/docs/MixpanelGroup.html b/docs/MixpanelGroup.html index 9a028fe0..ba93901e 100644 --- a/docs/MixpanelGroup.html +++ b/docs/MixpanelGroup.html @@ -95,7 +95,7 @@

new Mixp
Source:
@@ -284,7 +284,7 @@

Parameters:
Source:
@@ -446,7 +446,7 @@
Parameters:
Source:
@@ -606,7 +606,7 @@
Parameters:
Source:
@@ -768,7 +768,7 @@
Parameters:
Source:
@@ -905,7 +905,7 @@
Parameters:
Source:
@@ -951,13 +951,13 @@
Parameters:

- Documentation generated by JSDoc 4.0.5 on Fri Nov 07 2025 13:06:53 GMT-0800 (Pacific Standard Time) + Documentation generated by JSDoc 4.0.5 on Fri Jul 10 2026 16:42:42 GMT+0000 (Coordinated Universal Time)
diff --git a/docs/People.html b/docs/People.html index a16c4bda..88b5e130 100644 --- a/docs/People.html +++ b/docs/People.html @@ -100,7 +100,7 @@

new PeopleSource:
@@ -289,7 +289,7 @@
Parameters:
Source:
@@ -377,7 +377,7 @@

clearChar
Source:
@@ -468,7 +468,7 @@

deleteUser<
Source:
@@ -630,7 +630,7 @@

Parameters:
Source:
@@ -792,7 +792,7 @@
Parameters:
Source:
@@ -954,7 +954,7 @@
Parameters:
Source:
@@ -1114,7 +1114,7 @@
Parameters:
Source:
@@ -1274,7 +1274,7 @@
Parameters:
Source:
@@ -1436,7 +1436,7 @@
Parameters:
Source:
@@ -1573,7 +1573,7 @@
Parameters:
Source:
@@ -1619,13 +1619,13 @@
Parameters:

- Documentation generated by JSDoc 4.0.5 on Fri Nov 07 2025 13:06:53 GMT-0800 (Pacific Standard Time) + Documentation generated by JSDoc 4.0.5 on Fri Jul 10 2026 16:42:42 GMT+0000 (Coordinated Universal Time)
diff --git a/docs/index.html b/docs/index.html index 80781900..45de41ae 100644 --- a/docs/index.html +++ b/docs/index.html @@ -46,7 +46,7 @@

Mixpanel React Native Library
-
+
July 10, 2026 - v3.5.0

Table of Contents

    @@ -84,12 +84,20 @@

    Steps

    npm install mixpanel-react-native
     
      +
    1. Install AsyncStorage (required for data persistence):
    2. +
    +
    npm install @react-native-async-storage/async-storage
    +
    +
    +

    Note: Starting from v3.2.0, @react-native-async-storage/async-storage is a peer dependency. This allows your project to use either v1.x or v2.x, avoiding conflicts with frameworks like Expo 52+.

    +
    +
    1. Under your application's ios folder, run
    pod install
     

    Please note: You do not need to update your Podfile to add Mixpanel.

    -
      +
      1. Since Xcode 12.5, there is a known swift compile issue, please refer to this workaround. However the compile issue has been resolved in Xcode 13.2.1+, there is no extra step required as long as you upgrade to Xcode 13.2.1+.

      2. Initialize Mixpanel

      @@ -135,29 +143,8 @@

      Complete Code Example

      export default SampleApp; -

      Feature Flags (Beta - 3.2.0-beta.1+)

      -

      Control features dynamically and run A/B tests with Mixpanel Feature Flags. Native mode only (iOS/Android) in beta.

      -

      Quick Start

      -
      // Enable during initialization
      -await mixpanel.init(false, {}, 'https://api.mixpanel.com', true, {
      -  enabled: true,
      -  context: { platform: 'mobile' }  // Optional targeting context
      -});
      -
      -// Check if feature is enabled
      -if (mixpanel.flags.areFlagsReady()) {
      -  const showNewUI = mixpanel.flags.isEnabledSync('new-feature', false);
      -  const buttonColor = mixpanel.flags.getVariantValueSync('button-color', 'blue');
      -}
      -
      -

      Key Methods

      -
        -
      • areFlagsReady() - Check if flags are loaded
      • -
      • isEnabledSync(name, fallback) - Check if feature is enabled
      • -
      • getVariantValueSync(name, fallback) - Get variant value
      • -
      • getVariantSync(name, fallback) - Get full variant object with metadata
      • -
      -

      All methods support async versions and snake_case aliases. See Feature Flags Quick Start Guide for complete documentation.

      +

      Feature Flags

      +

      Please see the documentation for how to integrate with Mixpanel feature flags.

      Expo and React Native for Web support (3.0.2 and above)

      Starting from version 3.0.2, we have introduced support for Expo, React Native for Web, and other platforms utilizing React Native that do not support iOS and Android directly. To enable this feature, @@ -218,13 +205,13 @@

      I want to know more!


      - Documentation generated by JSDoc 4.0.5 on Fri Nov 07 2025 13:06:53 GMT-0800 (Pacific Standard Time) + Documentation generated by JSDoc 4.0.5 on Fri Jul 10 2026 16:42:42 GMT+0000 (Coordinated Universal Time)
      diff --git a/docs/index.js.html b/docs/index.js.html index ccd8237b..32547827 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -32,6 +32,7 @@

      Source: index.js

      import packageJson from "./package.json"; const {MixpanelReactNative} = NativeModules; import MixpanelMain from "mixpanel-react-native/javascript/mixpanel-main" +import { MixpanelLogger } from "mixpanel-react-native/javascript/mixpanel-logger" const DevicePlatform = { Unknown: "Unknown", @@ -95,11 +96,10 @@

      Source: index.js

      * <p>Feature Flags enable dynamic feature control and A/B testing capabilities. * This property is lazy-loaded to avoid unnecessary initialization until first access. * - * <p><b>Native Mode Only:</b> Feature flags are currently only available when using native mode - * (iOS/Android). JavaScript mode (Expo/React Native Web) support is planned for a future release. + * <p>Feature flags work in both native mode (iOS/Android) and JavaScript mode (Expo/React Native Web). + * In JavaScript mode, use {@link Flags#updateContext} to update targeting context at runtime. * * @return {Flags} an instance of Flags that provides access to feature flag operations - * @throws {Error} if accessed in JavaScript mode (when native modules are not available) * * @example * // Check if flags are ready @@ -114,18 +114,19 @@

      Source: index.js

      * @see Flags */ get flags() { - // Short circuit for JavaScript mode - flags not ready for public use - if (this.mixpanelImpl !== MixpanelReactNative) { - throw new Error( - "Feature flags are only available in native mode. " + - "JavaScript mode support is coming in a future release." - ); - } - if (!this._flags) { + // Check if feature flags are enabled and warn if not + if (!this.featureFlagsOptions || !this.featureFlagsOptions.enabled) { + MixpanelLogger.warn( + this.token, + "Accessing feature flags API but flags are not enabled. " + + "Call init() with featureFlagsOptions.enabled = true to enable feature flags. " + + "Flag methods will return fallback values." + ); + } // Lazy load the Flags instance with proper dependencies const Flags = require("./javascript/mixpanel-flags").Flags; - this._flags = new Flags(this.token, this.mixpanelImpl, this.storage); + this._flags = new Flags(this.token, this.mixpanelImpl); } return this._flags; } @@ -141,13 +142,17 @@

      Source: index.js

      * @param {object} [superProperties={}] A Map containing the key value pairs of the super properties to register. * These properties will be sent with every event. Pass {} if no super properties needed. * @param {string} [serverURL="https://api.mixpanel.com"] The base URL used for Mixpanel API requests. - * Use "https://api-eu.mixpanel.com" for EU data residency. See setServerURL() + * Must match your project's data residency region: + * US (default): "https://api.mixpanel.com", + * EU: "https://api-eu.mixpanel.com", + * India: "https://api-in.mixpanel.com". See setServerURL() * @param {boolean} [useGzipCompression=false] Whether to use gzip compression for network requests. * Enabling this reduces bandwidth usage but adds slight CPU overhead. * @param {object} [featureFlagsOptions={}] Feature flags configuration object with the following properties: * @param {boolean} [featureFlagsOptions.enabled=false] Whether to enable feature flags functionality * @param {object} [featureFlagsOptions.context={}] Context properties used for feature flag targeting. - * Can include user properties, device properties, or any custom properties for flag evaluation. + * Use the `custom_properties` key to nest targeting properties + * (e.g., `context: { custom_properties: { user_tier: 'premium' } }`). * Note: In native mode, context must be set during initialization and cannot be updated later. * @returns {Promise<void>} A promise that resolves when initialization is complete * @@ -162,8 +167,10 @@

      Source: index.js

      * await mixpanel.init(false, {}, 'https://api.mixpanel.com', false, { * enabled: true, * context: { - * platform: 'mobile', - * app_version: '2.1.0' + * custom_properties: { + * platform: 'mobile', + * app_version: '2.1.0' + * } * } * }); * @@ -238,7 +245,9 @@

      Source: index.js

      /** * Set the base URL used for Mixpanel API requests. * Useful if you need to proxy Mixpanel requests. Defaults to https://api.mixpanel.com. - * To route data to Mixpanel's EU servers, set to https://api-eu.mixpanel.com + * Must match your project's data residency region: + * US (default): https://api.mixpanel.com, EU: https://api-eu.mixpanel.com, + * India: https://api-in.mixpanel.com * * @param {string} serverURL the base URL used for Mixpanel API requests * @@ -654,7 +663,13 @@

      Source: index.js

      Useful for clearing data when a user logs out. */ reset() { - this.mixpanelImpl.reset(this.token); + this.mixpanelImpl.reset(this.token).then(() => { + if (this._flags) { + this._flags.reset().catch((error) => { + MixpanelLogger.log(this.token, "Flags reset failed:", error); + }); + } + }); } /** @@ -1127,13 +1142,13 @@

      Source: index.js


      - Documentation generated by JSDoc 4.0.5 on Fri Nov 07 2025 13:06:53 GMT-0800 (Pacific Standard Time) + Documentation generated by JSDoc 4.0.5 on Fri Jul 10 2026 16:42:42 GMT+0000 (Coordinated Universal Time)