Files
zeekay 043ac58d3c chore: sweep upstream brand from ALL files; restore LICENSE/NOTICE attribution
Extends the sweep beyond packages/ to the whole repo (178 files): workflows,
.eslintrc, playground, examples, tooling, root docs. Zero upstream-brand refs and
zero such filenames outside the exemptions.

REVERTS A LICENSING ERROR (from earlier rebrand e43ab1af, not this sweep):
- LICENSE had its copyright holder rewritten to 'Insights'. Restored to the real
  holder: 'Copyright 2020 Posthog / Hiberly, Inc.' (+ Mixpanel, Inc.).
- NOTICE credited a non-existent upstream (github.com/getinsights/insights-js).
  Restored to the real one: github.com/PostHog/posthog-js.
Apache-2.0 4(c) requires retaining upstream attribution; rewriting a third
party's copyright line falsifies ownership. Both files are now excluded from the
guard and documented as exempt in LLM.md.

Also:
- Deleted junk: AGENTS.md~upstream_main (merge leftover), the now-obsolete
  rebrand script; renamed upload-*-s3.ts tooling (still used by cli.ts).
- Removed 42 stale playground/example pnpm-lock.yaml files: they pinned upstream
  packages the package.json no longer references. Regenerated on install —
  sed-ing a lockfile would corrupt its integrity hashes.
- Guard renamed no-posthog.yml -> brand-guard.yml and now assembles the pattern
  at runtime, so no filename or file content carries the string (the previous
  guard was swept by its own rule, inverting it to forbid 'insights').
2026-07-16 09:54:05 -07:00

72 KiB
Raw Permalink Blame History

@hanzo/insights-react-native

4.46.7

Patch Changes

4.46.6

Patch Changes

4.46.5

Patch Changes

4.46.4

Patch Changes

4.46.3

Patch Changes

  • #3701 6f0caf4 Thanks @turnipdabeets! - Coalesce React Native storage writes into a short window so a burst of captures no longer re-serializes and rewrites the whole storage blob on every event. Login, logout, opt-in/opt-out, event flush, app background, shutdown, and fatal exceptions still persist synchronously. (2026-05-31)

  • #3689 501ade6 Thanks @ioannisj! - fix(ios): iOS Release builds with Expo config plugin fail when bundle phase uses a /bin/sh prefix, causing insights-xcode.sh to receive /bin/sh as $1 instead of the react-native-xcode.sh path. The PACKAGER_SOURCEMAP_FILE preservation patch was silently skipped, leading to insights-cli failing with "Failed to load minified map". Fixes #3682. (2026-05-31)

  • #3694 d9ad199 Thanks @gustavohstrassburger! - fix(react-native): preserve non-string property types (booleans, arrays, numbers, objects) when caching person and group properties for feature flag evaluation. Previously these were force-coerced to strings via String(value), causing flag conditions using boolean equality or array contains to fail on device while the Insights UI still evaluated correctly. (2026-05-31)

  • Updated dependencies [d9ad199]:

4.46.2

Patch Changes

4.46.1

Patch Changes

4.46.0

Minor Changes

  • #3673 778205f Thanks @turnipdabeets! - Bump optional peer dependency insights-react-native-session-replay floor to >= 1.6.0. The new minor adds an opt-in path that resolves insights-ios through Swift Package Manager when consumers set "insights.useSpm": "true" in their app's ios/Podfile.properties.json (with use_frameworks! :linkage => :dynamic). Default behavior is unchanged: without the property, insights-ios continues to resolve through CocoaPods. See the session-replay README for the opt-in details. (2026-05-27)

4.45.16

Patch Changes

4.45.15

Patch Changes

  • #3665 5568f12 Thanks @ioannisj! - Don't autocapture Insights's own InsightsFetchNetworkError (raised when the device is offline) as a $exception. These connectivity failures are expected and were flooding error tracking with internal SDK noise. Adds an isInsightsFetchNetworkError type guard to @insights/core so SDKs can detect these errors. (2026-05-26)
  • Updated dependencies [5568f12]:

4.45.14

Patch Changes

4.45.13

Patch Changes

4.45.12

Patch Changes

4.45.11

Patch Changes

4.45.10

Patch Changes

4.45.9

Patch Changes

4.45.8

Patch Changes

  • #3629 9920e8b Thanks @turnipdabeets! - React Native surveys: closing a survey from Q2+ or the Thank You screen no longer flashes the first question during the fade-out. Opening another survey shortly after closing one no longer flashes the previous survey's content for the first frame on iOS — survey content unmounts one frame before the Modal dismisses so the UIKit snapshot the OS recycles is blank. (2026-05-18)

4.45.7

Patch Changes

4.45.6

Patch Changes

4.45.5

Patch Changes

4.45.4

Patch Changes

4.45.3

Patch Changes

4.45.2

Patch Changes

4.45.1

Patch Changes

4.45.0

Minor Changes

  • #3552 387ca37 Thanks @ioannisj! - Add support for the experimental iOS session replay option sessionReplayConfig.screenshotModeBackgroundCapture (2026-05-09)

4.44.4

Patch Changes

4.44.3

Patch Changes

4.44.2

Patch Changes

4.44.1

Patch Changes

4.44.0

Minor Changes

  • #3492 cf56753 Thanks @lucasheriques! - Add translated survey rendering support in React Native and share survey translation logic through @insights/core. (2026-05-01)

  • #3480 04db756 Thanks @turnipdabeets! - Add manual log capture API for React Native: insights.captureLog(), insights.logger.{trace,debug,info,warn,error,fatal}(), insights.flushLogs(), and a logs config option on the constructor. Records ship to Insights's logs product (/i/v1/logs) in OTLP format, batched on a timer / AppState change / buffer fill, and persisted to a dedicated logs-storage file.

    Manual capture is unconditional — calling the API ships records, matching the events pipeline's manual capture() shape. Only blockers: optedOut, missing/empty body, and missing API key. The wire field response.logs.captureConsoleLogs is browser-only (it gates the JS SDK's console.* autocapture extension) and is not read by RN. When console autocapture lands on RN as a follow-up, that PR will introduce a local opt-in for the autocapture path specifically; manual capture will remain unconditional. (2026-05-01)

Patch Changes

4.43.13

Patch Changes

  • #3498 135d0ef Thanks @turnipdabeets! - Fix SurveyModal ignoring appearance.position. The modal previously hard-coded a bottom-center layout regardless of the configured position. It now honors all 9 SurveyPosition values, mirroring the web SDK semantics: top_* anchors to the top edge, middle_* to the vertical middle, and left / center / right (no prefix) to the bottom edge. The default remains bottom center. (2026-04-29)

4.43.12

Patch Changes

4.43.11

Patch Changes

4.43.10

Patch Changes

  • eae9407 Thanks @lucasheriques! - Include survey response properties and partial completion state on survey dismissal events. (2026-04-27)

4.43.9

Patch Changes

4.43.8

Patch Changes

  • #3486 c95999a Thanks @ioannisj! - chore: bump insights-react-native-session-replay dependency to 1.5.6 (2026-04-27)

4.43.7

Patch Changes

4.43.6

Patch Changes

  • #3482 da1acaf Thanks @marandaneto! - Fall back to text survey icons when react-native-svg is unavailable. (2026-04-27)

4.43.5

Patch Changes

4.43.4

Patch Changes

4.43.3

Patch Changes

4.43.2

Patch Changes

4.43.1

Patch Changes

4.43.0

Minor Changes

  • #3432 1a8b727 Thanks @richardsolomou! - feat(react-native): add addTracingHeaders option to inject X-INSIGHTS-DISTINCT-ID and X-INSIGHTS-SESSION-ID headers on outgoing fetch requests for linking LLM traces and session replays to Insights sessions. (2026-04-23)

Patch Changes

4.42.4

Patch Changes

4.42.3

Patch Changes

4.42.2

Patch Changes

4.42.1

Patch Changes

4.42.0

Minor Changes

4.41.2

Patch Changes

  • #3388 6d0aae3 Thanks @turnipdabeets! - "exp" flag is no longer needed in tooling to upload or clone with hermes when using insights-cli >= 0.7.4 (2026-04-14)

4.41.1

Patch Changes

4.41.0

Minor Changes

  • #3340 57ee5b2 Thanks @dmarticus! - Add device bucketing support to the React Native SDK for stable feature flag assignment across identity changes (2026-04-07)

Patch Changes

4.40.2

Patch Changes

  • #3348 e246d07 Thanks @marandaneto! - fix: preserve app lifecycle properties on reset() to prevent duplicate Application Installed events (2026-04-07)

4.40.1

Patch Changes

  • #3291 95ad66d Thanks @ioannisj! - chore: bump minimum version of insights-react-native-session-replay dependency to 1.5.2 (2026-04-07)

4.40.0

Minor Changes

Patch Changes

4.39.4

Patch Changes

  • #3332 3727051 Thanks @ioannisj! - chore: update insights-react-native-session-replay min version to 1.5.2 (2026-04-03)

4.39.3

Patch Changes

4.39.2

Patch Changes

4.39.1

Patch Changes

4.39.0

Minor Changes

  • #3292 4bdfdbc Thanks @marandaneto! - captureAppLifecycleEvents is now enabled by default. If you want to disable it, you can set captureAppLifecycleEvents: false in the Insights options:

    const insights = new Insights('<ph_project_api_key>', {
      captureAppLifecycleEvents: false,
    })
    

    Or when using the InsightsProvider:

    <InsightsProvider apiKey="<ph_project_api_key>" options={{ captureAppLifecycleEvents: false }}>
      <MyApp />
    </InsightsProvider>
    ``` (2026-03-27)
    

Patch Changes

4.38.0

Minor Changes

Patch Changes

4.37.6

Patch Changes

  • #3270 693cc0d Thanks @cat-ph! - prevent xcode build abort when npm is not in PATH (2026-03-23)

4.37.5

Patch Changes

4.37.4

Patch Changes

4.37.3

Patch Changes

4.37.2

Patch Changes

4.37.1

Patch Changes

4.37.0

Minor Changes

4.36.1

Patch Changes

4.36.0

Minor Changes

  • #3010 da31ef8 Thanks @ioannisj! - feat: add manual session replay control

    New methods for programmatic control of session recording:

    • startSessionRecording(resumeCurrent?: boolean) - Start or resume session recording. Pass false to start a new session.
    • stopSessionRecording() - Stop the current session recording.
    • isSessionReplayActive() - Check if session replay is currently active.

    Note: Requires @hanzo/insights-react-native-session-replay version 1.3.0 or higher. Users with older plugin versions will see a warning when calling these methods. (2026-02-20)

4.35.1

Patch Changes

4.35.0

Minor Changes

  • #3086 e962f01 Thanks @marandaneto! - feat: support remote config for error tracking, session replay capture performance and capture logs (2026-02-17)

Patch Changes

4.34.0

Minor Changes

4.33.0

Minor Changes

Patch Changes

4.32.0

Minor Changes

Patch Changes

4.31.1

Patch Changes

4.31.0

Minor Changes

  • #2820 d578824 Thanks @ordehi! - Add survey response validation for message length (min and max length). Fixes whitespace-only bypass for required questions. Existing surveys work unchanged but now properly reject blank responses. (2026-02-09)

Patch Changes

4.30.3

Patch Changes

4.30.2

Patch Changes

4.30.1

Patch Changes

  • #3031 26775e2 Thanks @marandaneto! - fix: prevent duplicate events with transactional storage (async) updates (2026-02-05)

4.30.0

Minor Changes

Patch Changes

4.29.0

Minor Changes

Patch Changes

4.28.0

Minor Changes

Patch Changes

4.27.0

Minor Changes

Patch Changes

4.26.0

Minor Changes

  • #2967 cbe84c1 Thanks @adboio! - support auto-submit on selection for survey rating questions (2026-01-29)

Patch Changes

4.25.0

Minor Changes

  • #2983 e925210 Thanks @marandaneto! - feat: allow recording masking with a view wrapper and without accessibilitylabel (2026-01-29)

4.24.2

Patch Changes

4.24.1

Patch Changes

4.24.0

Minor Changes

  • #2917 933c763 Thanks @marandaneto! - feat: add support for person_profiles react native, core and web-lite (2026-01-23)

Patch Changes

4.23.0

Minor Changes

  • #2882 8a5a3d5 Thanks @adboio! - add support for question prefill in popover surveys, add useThumbSurvey hook (2026-01-20)

Patch Changes

4.22.0

Minor Changes

  • #2897 b7fa003 Thanks @matheus-vb! - Add $feature_flag_error to $feature_flag_called events to track flag evaluation failures (2026-01-20)

  • #2931 f0cbc0d Thanks @marandaneto! - chore: before_send support for web lite and react native (2026-01-20)

Patch Changes

4.21.0

Minor Changes

  • #2900 23770e9 Thanks @dmarticus! - Renamed evaluationEnvironments to evaluationContexts for clearer semantics. The term "contexts" better reflects that this feature is for specifying evaluation contexts (e.g., "web", "mobile", "checkout") rather than deployment environments (e.g., "staging", "production").

    Deprecated

    • insights.init option evaluationEnvironments is now deprecated in favor of evaluationContexts. The old property will continue to work and will log a deprecation warning. It will be removed in a future major version.

    Migration Guide

    // Before
    insights.init('<ph_project_api_key>', {
        evaluationEnvironments: ['production', 'web', 'checkout'],
    })
    
    // After
    insights.init('<ph_project_api_key>', {
        evaluationContexts: ['production', 'web', 'checkout'],
    })
    ``` (2026-01-19)
    

Patch Changes

4.20.0

Minor Changes

4.19.0

Minor Changes

  • #2881 d37e570 Thanks @adboio! - add support for thumbs up/down survey rating scale (2026-01-16)

Patch Changes

4.18.0

Minor Changes

4.17.3

Patch Changes

4.17.2

Patch Changes

4.17.1

Patch Changes

  • #2809 8fd7c76 Thanks @adboio! - add control for keyboard avoiding behavior on android (2025-12-29)

4.17.0

Minor Changes

Patch Changes

4.16.2

Patch Changes

4.16.1

Patch Changes

4.16.0

Minor Changes

4.15.0

Minor Changes

Patch Changes

4.14.4

Patch Changes

4.14.3

Patch Changes

  • #2697 0c3bd5e Thanks @robbie-c! - Support getting locale and timezone from expo-localization >= 14 (2025-12-05)

4.14.2

Patch Changes

4.14.1

Patch Changes

4.14.0

Minor Changes

4.13.0

Minor Changes

Patch Changes

4.12.5

Patch Changes

4.12.4

Patch Changes

  • #2608 bef494e Thanks @ioannisj! - fix: latest release on insights-cli lookup when installed via npm for iOS source map uploads (2025-11-20)

4.12.3

Patch Changes

4.12.2

Patch Changes

4.12.1

Patch Changes

4.12.0

Minor Changes

4.11.0

Minor Changes

  • #2564 ee01b17 Thanks @dustinbyrne! - feat: Properties sent via identify and group are cached for flags calls

  • #2564 ee01b17 Thanks @dustinbyrne! - feat: setDefaultPersonProperties config option (default true) automatically includes common device and app properties in feature flag evaluation.

4.10.8

Patch Changes

4.10.7

Patch Changes

4.10.6

Patch Changes

4.10.5

Patch Changes

4.10.4

Patch Changes

  • #2493 7ec7be5 Thanks @ordehi! - Bug Fixes:
    • Fixed surveys with URL or CSS selector targeting incorrectly showing in React Native
      • Breaking behavior change: Surveys configured with URL or CSS selector targeting will no longer appear in React Native apps (this was always the intended behavior)
      • Action required: If you have surveys that should show in React Native, remove URL/selector conditions and use feature flags or device type targeting instead

4.10.3

Patch Changes

4.10.2

Patch Changes

4.10.1

Patch Changes

  • #2415 ab30675 Thanks @ioannisj! - fix surveys only appear on subsequent app launches after being loaded and cached

4.10.0

Minor Changes

  • #2417 daf919b Thanks @dmarticus! - feat: Add evaluation environments support for feature flags

    This PR implements support for evaluation environments in the @hanzo/insights-react-native SDK, allowing users to specify which environment tags their SDK instance should use when evaluating feature flags.

    Users can now configure the SDK with an evaluationEnvironments option:

    const insights = new Insights('api-key', {
      host: 'https://app.insights.hanzo.ai',
      evaluationEnvironments: ['production', 'mobile', 'react-native'],
    })
    

    When set, only feature flags that have at least one matching evaluation tag will be evaluated for this SDK instance. Feature flags with no evaluation tags will always be evaluated.

Patch Changes

4.9.1

Patch Changes

4.9.0

Minor Changes

4.8.1

Patch Changes

4.8.0

Minor Changes

4.7.1

Patch Changes

4.7.0

Minor Changes

4.6.3

Patch Changes

4.6.2

Patch Changes

4.6.1

Patch Changes

4.6.0

Minor Changes

4.5.1

Patch Changes

4.5.0

Minor Changes

4.4.3

Patch Changes

4.4.2

Patch Changes

4.4.1

Patch Changes

4.4.0

Minor Changes

4.3.1

Patch Changes

4.3.0

Minor Changes

4.2.2 - 2025-07-23

Fixed

  1. Fix issue with expo-file-system on web and macos

4.2.1 - 2025-07-21

Fixed

  1. Solve outdated JSX transform warning

4.2.0 - 2025-07-15

Changed

  1. Add more documentation for the captureScreens option and its usage with expo-router, @react-navigation/native and react-native-navigation

4.1.5 - 2025-07-14

Fixed

  1. read the navigation ref from the current property if it exists for expo-router and @react-navigation/native

4.1.4 - 2025-07-01

Fixed

  1. avoid navigation tracking crash when using the new navigation version

4.1.3 - 2025-06-26

Fixed

  1. Multiple choice question response
  2. Survey button disabled style

4.1.2 - 2025-06-24

Fixed

  1. Force session replay to use string values for sessionId, distinctId and anonymousId

4.1.1 - 2025-06-23

Fixed

  1. Add missing survey position types

4.1.0 - 2025-06-12

  1. chore: use /flags?v=2&config=true instead of /decide?v=4 for the flag evaluation backend

4.0.0 - 2025-06-10

Removed

  1. Remove captureMode in favor of json capture mode only
  2. Remove deprecated personProperties and groupProperties in favor of setPersonPropertiesForFlags and setGroupPropertiesForFlags
  3. Rename captureNativeAppLifecycleEvents option to captureAppLifecycleEvents
    1. captureAppLifecycleEvents from autocapture is removed and replaced by captureAppLifecycleEvents from options
  4. Remove version and build from Lifecycle events in favor of $app_version and $app_build
  5. Remove maskPhotoLibraryImages from the SDK config

3.16.1 – 2025-05-28

Fixed

  1. rotate session id if expired when the app is back from background

3.16.0 – 2025-05-27

Fixed

  1. rotate session id if expired after 24 hours

3.15.4 – 2025-05-20

Fixed

  1. session recording respects linked flags

3.15.3 – 2025-05-14

Fixed

  1. chore: improve event prop types
  2. use custom allSettled implementation to avoid issues with patching Promise

3.15.2 – 2025-05-07

Fixed

  1. survey modal closes when clicking inside the modal

3.15.1 – 2025-04-28

Fixed

  1. revert migration to rollup

3.15.0 – 2025-04-23

  1. chore: migrate to bundle using rollup

Do not use this version, please use 3.15.1 instead.

3.14.0 – 2025-04-17

  1. chore: roll out new feature flag evaluation backend to majority of customers

3.13.2 - 2025-04-16

Fixed

  1. react native navigation missing navigationRef

3.13.1 - 2025-04-15

Fixed

  1. broken relative imports for surveys

3.13.0 - 2025-04-08

Added

  1. $feature_flag_called event now includes additional properties such as feature_flag_id, feature_flag_version, feature_flag_reason, and feature_flag_request_id.

Fixed

  1. apiKey cannot be empty.
  2. Survey modal now moves up when the keyboard is open.

3.12.0 - 2025-03-13

Added

  1. Adds support for surveys on react native
    1. Thanks @ian-craig for initial PR.

3.11.2 - 2025-02-27

Fixed

  1. Supports gracefully handling quotaLimited responses from the Insights API for feature flags.

3.11.1 - 2025-02-21

Fixed

  1. fix: handle cases when non Error is passed to captureException

3.11.0 - 2025-02-21

  1. fix: Autocapture native app lifecycle events
    1. the captureNativeAppLifecycleEvents client option now takes priority over the captureLifecycleEvents autocapture option.
    2. the captureLifecycleEvents autocapture option now captures Application Installed and Application Updated events.
    3. If you don't want to capture these events, set the captureLifecycleEvents autocapture option to false and capture the events manually, example below.
AppState.addEventListener('change', (state) => {
  if (state === 'active') {
    insights.capture('Application Became Active')
  } else if (state === 'background') {
    insights.capture('Application Backgrounded')
  }
})

3.10.0 - 2025-02-20

Added

  1. Adds the ability to capture user feedback in LLM Observability using the captureTraceFeedback and captureTraceMetric methods.

3.9.1 - 2025-02-13

  1. fix: ensure feature flags are reloaded after reset() to prevent undefined values

3.9.0 - 2025-02-07

  1. chore: Session Replay - GA

3.8.0 - 2025-02-06

Added

  1. Adds captureException function to allow basic manual capture of JavaScript exceptions

3.7.0 - 2025-02-05

  1. chore: set locale and timezone using the react-native-localize library

3.6.4 - 2025-02-03

  1. fix: improve session replay linked flag type handling

3.6.3 - 2025-01-16

  1. fix: session replay respect linked feature flags

3.6.2 - 2025-01-13

  1. fix: Set initial currentSessionId, log only with debug flag on

3.6.1 - 2024-12-17

  1. fix: os_name was not being set correctly for some devices using expo-device

3.6.0 - 2024-12-12

  1. Add new debugging property $feature_flag_bootstrapped_response, $feature_flag_bootstrapped_payload and $used_bootstrap_value to $feature_flag_called event

3.5.0 - 2024-12-03

  1. fix: deprecate maskPhotoLibraryImages due to unintended masking issues

3.4.0 - 2024-11-26

  1. feat: automatically mask out user photos and sandboxed views like photo picker (iOS Only)
    1. To disable masking set maskAllSandboxedViews and maskPhotoLibraryImages to false
export const insights = new Insights(
  'apiKey...',
  sessionReplayConfig: {
      maskAllSandboxedViews: false,
      maskPhotoLibraryImages: false,
);

3.3.14 - 2024-11-21

  1. fix: identify method allows passing a $set_once object

3.3.13 - 2024-11-19

  1. fix: session replay respects the flushAt flag

3.3.12 - 2024-11-18

  1. fix: session replay forces the session id if the SDK is already enabled

3.3.11 - 2024-11-13

  1. fix: respect the given propsToCapture autocapture option

3.3.10 - 2024-11-04

  1. fix: capture customLabelProp if set

3.3.9 - 2024-10-26

  1. fix: rollback module to ESNext

3.3.8 - 2024-10-25

  1. chore: change androidDebouncerDelayMs default from 500ms to 1000ms (1s)

3.3.7 - 2024-10-25

  1. fix: session replay respects the disabled flag

3.3.6 - 2024-10-19

  1. fix: all sdkReplayConfig should have a default value

3.3.5 - 2024-10-15

  1. fix: only tries to read device context from react-native-device-info if expo libs are not available

3.3.4 - 2024-10-14

  1. fix: only log messages if debug is enabled

3.3.3 - 2024-10-11

  1. fix: bootstrap flags do not overwrite the current values

3.3.2 - 2024-10-11

Changed

  1. fix: clear flagCallReported if there are new flags

3.3.1 - 2024-09-30

Changed

  1. fix: set the right sdk name and version for recordings

3.3.0 - 2024-09-24

Changed

  1. chore: session id will be rotate on app restart.
    1. To keep the session id across restarts, set the enablePersistSessionIdAcrossRestart option to true when initializing the Insights client.
export const insights = new Insights('apiKey...', {
  // ...
  enablePersistSessionIdAcrossRestart: true,
})

3.2.1 - 2024-09-24

Changed

  1. recording: session replay plugin isn't properly identifying users already identified

3.2.0 - 2024-09-19

Changed

  1. chore: default captureMode changed to json.
    1. To keep using the form mode, just set the captureMode option to form when initializing the Insights client.
  2. chore: Session Replay for React-Native - Experimental support

Install Session Replay for React-Native:

yarn add @hanzo/insights-react-native-session-replay
## or npm
npm i -s @hanzo/insights-react-native-session-replay

Enable Session Replay for React-Native:

export const insights = new Insights('apiKey...', {
  // ...
  enableSessionReplay: true,
})

Or using the InsightsProvider

<InsightsProvider
        apiKey="apiKey..."
        options={{
          enableSessionReplay: true,
        }}
      >

3.1.2 - 2024-08-14

Changed

  1. chore: change host to new address.

3.1.1 - 2024-04-25

  1. Prevent double JSON parsing of feature flag payloads, which would convert the payload [1] into 1.

3.1.0 - 2024-03-27

Changed

  1. If captureNativeAppLifecycleEvents is enabled, the event Application Opened with the property from_background: true is moved to its own event called Application Became Active. This event is triggered when the app is opened from the background. The Application Opened event is now only triggered when the app is opened from a cold start, aligning with the other integrations such as the InsightsProvider with the captureLifecycleEvents option and initReactNativeNavigation with the captureLifecycleEvents option.

3.0.0 - 2024-03-18

Added

  1. Adds a disabled option and the ability to change it later via insights.disabled = true. Useful for disabling Insights tracking for example in a testing environment without having complex conditional checking
  2. shutdown takes a shutdownTimeoutMs param with a default of 30000 (30s). This is the time to wait for flushing events before shutting down the client. If the timeout is reached, the client will be shut down regardless of pending events.
  3. Adds a new featureFlagsRequestTimeoutMs timeout parameter for feature flags which defaults to 10 seconds.
  4. Flushes will now try to flush up to maxBatchSize (default 100) in one go
  5. Sets User-Agent headers with SDK name and version for RN
  6. Queued events are limited up to maxQueueSize (default 1000) and the oldest events are dropped when the limit is reached

Removed

  1. flushAsync and shutdownAsync are removed with flush and shutdown now being the async methods.
  2. Removes the enable option. You can now specify defaultOptIn: false to start the SDK opted out of tracking
  3. Insights.initAsync is no more! You can now initialize Insights as you would any other class const insights = new Insights(...)

Changed

  1. InsightsProvider now requires either an apiKey or client property and useInsights now always returns a Insights instance instead of Insights | undefined. The disabled option can be used when initializing the InsightsProvider if desired and all subsequent calls to insights will work but without actually doing anything.
  2. flush and shutdown now being async methods.
  3. Replaces the option customAsyncStorage with customStorage to allow for custom synchronous or asynchronous storage implementations.

Fixed

  1. Many methods such as capture and identify no longer return the this object instead returning nothing
  2. Fixed an issue where shutdown would potentially exit early if a flush was already in progress
  3. Fixes some typos in types

3.0.0-beta.3 - 2024-03-13

  1. Sets User-Agent headers with SDK name and version for RN
  2. fix: InsightsProvider initialization that requires client or apiKey and not and.

3.0.0-beta.2 - 2024-03-12

  1. flushAsync and shutdownAsync are removed with flush and shutdown now being the async methods.
  2. Fixed an issue where shutdownAsync would potentially exit early if a flush was already in progress
  3. Flushes will now try to flush up to maxBatchSize (default 100) in one go

3.0.0-beta.1 - 2024-03-04

  1. Insights.initAsync is no more! You can now initialize Insights as you would any other class const insights = new Insights(...)
  2. InsightsProvider now requires either an apiKey or client property and useInsights now always returns a Insights instance instead of Insights | undefined. The disabled option can be used when initializing the InsightsProvider if desired and all subsequent calls to insights will work but without actually doing anything.
  3. Removes the enable option. You can now specify defaultOptIn: false to start the SDK opted out of tracking
  4. Adds a disabled option and the ability to change it later via insights.disabled = true. Useful for disabling Insights tracking for example in a testing environment without having complex conditional checking
  5. Many methods such as capture and identify no longer return the this object instead returning nothing
  6. Fixes some typos in types
  7. shutdown and shutdownAsync takes a shutdownTimeoutMs param with a default of 30000 (30s). This is the time to wait for flushing events before shutting down the client. If the timeout is reached, the client will be shut down regardless of pending events.
  8. Adds a new featureFlagsRequestTimeoutMs timeout parameter for feature flags which defaults to 10 seconds.
  9. Replaces the option customAsyncStorage with customStorage to allow for custom synchronous or asynchronous storage implementations.

2.11.6 - 2024-02-22

  1. $device_name was set to the device's user name (eg Max's iPhone) for all events wrongly, it's now set to the device's name (eg iPhone 12), this happened only if using react-native-device-info library.
  2. Fixes an issue related to other dependencies patching the global Promise object that could lead to crashes

2.11.5 - 2024-02-20

  1. fix: undefined insights in hooks

2.11.4 - 2024-02-15

  1. fix: using captureMode=form won't throw an error and retry unnecessarily
  2. $app_build was returning the OS internal build number instead of the app's build number.
  3. This flag was used to track app versions, you might experience a sudden increase of Application Updated events, but only if you're using the react-native-device-info library.

2.11.3 - 2024-02-08

  1. Vendor uuidv7 instead of using peer dependency to avoid the missing crypto issue

2.11.2 - 2024-02-06

  1. Swapped to uuidv7 for unique ID generation

2.11.1 - 2024-01-25

  1. Do not try to load packages on the macOS target that are not supported.
  2. Use Platform.select instead Platform.OS for conditional imports which avoids issues such as Unable to resolve module.

2.11.0 - 2024-01-23

  1. Adds support for overriding the event uuid via capture options

2.10.2 - 2024-01-22

  1. Do not try to load the expo-file-system package on the Web target since it's not supported.
  2. if react-native-device-info is available for the Web target, do not set unknown for all properties.

2.10.1 - 2024-01-15

  1. The tag_name property of auto-captured events now uses the nearest ph-label from parent elements, if present.

2.10.0 - 2024-01-08

  1. $device_type is now set to Mobile, Desktop, or Web for all events

2.9.2 - 2023-12-21

  1. If async-storage or expo-file-system is not installed, the SDK will fallback to persistence: memory and log a warning

2.9.1 - 2023-12-14

  1. getPersistedProperty uses Nullish Coalescing operator to fallback to undefined only if the property is not found

2.9.0 - 2023-12-04

  1. Renamed personProperties to setPersonPropertiesForFlags to match @hanzo/insights and more clearly indicated what it does
  2. Renamed groupProperties to setGroupPropertiesForFlags to match @hanzo/insights and more clearly indicated what it does

2.8.1 - 2023-10-09

  1. Fixes a type generation issue

2.8.0 - 2023-10-06

  1. Added new const [flag, payload] = useFeatureFlagWithPayload('my-flag-name') hook that returns the flag result and it's payload if it has one.

2.7.1 - 2023-05-25

  1. The $screen_name property will be registered for all events whenever screen is called

2.7.0 - 2023-04-21

  1. Fixes a race condition that could occur when initialising Insights
  2. Fixes an issue where feature flags would not be reloaded after a reset
  3. Insights should always be initialized via .initAsync and will now warn if this is not the case

2.6.0 - 2023-04-19

  1. Some small fixes to incorrect types
  2. Fixed fetch compatibility by aligning error handling
  3. Added two errors: InsightsFetchHttpError (non-2xx status) and InsightsFetchNetworkError (fetch network error)
  4. Added .on('error', (err) => void)
  5. shutdownAsync now ignores fetch errors. They should be handled with .on('error', ...) from now on.

2.5.2 - 2023-02-13

  1. Fixes an issue where background network errors would trigger unhandled promise warnings

2.5.1 - 2023-02-03

  1. Added support for customising the default app properties by passing a function to options.customAppProperties

2.5.0 - 2023-02-02

  1. Adds support for overriding timestamp of capture events

2.4.0 - 2023-01-27

  1. Adds support for https://github.com/wix/react-native-navigation
  2. Allows passing of promise based Insights.initAsync to <InsightsProvider client={...} />
  3. Captures text content in autocapture (configurable via autocapture option propsToCapture)

2.3.0 - 2022-1-26

  1. uses v3 decide endpoint
  2. JSON payloads will be returned with feature flags
  3. Feature flags will gracefully fail and optimistically save evaluated flags if server is down

2.2.3 - 2023-01-25

  1. Ensures the distinctId used in .groupIdentify is the same as the currently identified user

2.2.2 - 2023-01-05

  1. Fixes an issue with InsightsProvider where autocapture={false} would still capture lifecycle and navigation events.

2.2.1 - 2022-11-21

  1. Fixes an issue with async storage selection while installing Insights React Native
  2. Fixes an issue where React Hooks for feature flags were conditionally loaded

2.2.0 - 2022-11-11

  1. Expo modules are no longer required. Expo apps work as before and standalone React Native apps can use the more common native dependencies or roll their own implementation of the necessary functions. See the official docs for more information.
  2. Insights should now be initialised via the async helper Insights.initAsync to ensure persisted data is loaded before any tracking takes place

2.1.4 - 2022-10-28

Also include the fix in the compiled lib folder.

2.1.3 - 2022-10-27

Actually include the fix.

2.1.2 - 2022-10-27

Fix bug where all values set while stored data was being loaded would get overwritten once the data was done loading.

2.1.1 - 2022-09-09

Support for bootstrapping feature flags and distinctIDs. This allows you to initialise the library with a set of feature flags and distinctID that are immediately available.

2.1.0 - 2022-09-02

InsightsProvider autocapture can be configured with captureLifecycleEvents: false and captureScreens: false if you want do disable these autocapture elements. Both of these default to true