Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@fullstory/react-native

fullstorydev272.4kMIT1.7.4TypeScript support: included

The official FullStory React Native plugin

react-native, fullstory

readme

FullStory React Native Plugin

CircleCI

FullStory's React Native plugin exposes access to the FullStory Native Mobile SDK from within a React Native app. This plug-in is intended to be used in conjunction with FullStory for Mobile Apps.

Install the React Native plugin

with npm

npm i @fullstory/react-native --save

with yarn

yarn add @fullstory/react-native

with expo-cli

expo install @fullstory/react-native

Configuring the babel plugin

@fullstory/babel-plugin-react-native is automatically included as a dependency to the FullStory React Native plugin. Please refer to the babel plugin's README.md for information on how to configure it.

@fullstory/babel-plugin-annotate-react is automatically included as a dependency to the FullStory React Native plugin. Please refer to the babel plugin's README.md for information on how to configure it for React Native.

Importing the React Native plugin

In order to use the FullStory Native Mobile SDK from within a React Native app, importing the React Native plugin is all that is required.

Importing Example

Here's an example of importing the SDK in a React Native app.

import FullStory from '@fullstory/react-native';

Configuring for Expo

This package cannot be used in the "Expo Go" app because it requires custom native code.

Add the config plugin to the plugins array of your app.json or app.config.json

{
  "expo": {
    "plugins": [
      [
        "@fullstory/react-native",
        {
          "version": "1.28.0",
          "org": "ABC",
          "additionalConfigs": {
            "ios": {
              "PreviewMode": true
            },
            "android": {
              "previewModeEnabled": false
            }
          }
        }
      ]
    ]
  }
}

Plugin Props

Plugins allow for extra customization by passing in an object with properties. If no extra properties are added, defaults will be used. Certain properties are required.

Property Platform Required Description
version Android & iOS FullStory for Mobile Apps plugin version.
org Android & iOS Your assigned organization ID.
host Android & iOS Optional. Defaults to: fullstory.com The server url your sessions are sent to.
recordOnStart Android & iOS Optional. Defaults to: true Setting RecordOnStart to false will prevent data capture until you explicitly invoke FS.restart() API.
additionalConfigs Android & iOS Optional. Defaults to: nil Pass additional configurations to Android or iOS.
enabledVariants Android Optional. Defaults to: release Specifies which variants to apply FullStory instrumentation.
logLevel Android Optional. Defaults to: info Captures any log statements at or above the specified level.
logcatLevel Android Optional. Defaults to: off Captures any Logcat messages at or above the specified level.
includeAssets iOS Optional. Defaults to: nil Specify webview file types to upload for playback. This is strongly recommended if you intend to capture WebViews.

changelog

Changelog

1.7.3

Add memory access protection for the onReady API on iOS.

1.7.3

Fixed an issue with New Architecture detection in React Native 77+.

1.7.2

Android: run click handler on UI thread. Android: do not log Pages API errors if Fullstory is disabled. iOS: fix a bug in React Native Navigation page detection that sometimes led to crashes.

1.7.1

Updated README.

1.7.0

Add Android click support for React Native 74. Add additional configuration options for Expo.

1.6.3

Support additional iOS configurations on Expo.

1.6.2

Fixed an inline require issue for React Native versions <=0.73.x on New Architecture.

1.6.1

Fixed an unresolved module issue in the React Native 0.74.0 support code. Fixed the host Expo configuration for newer Fullstory SDK versions.

1.6.0

Add support for React Native 0.74.0 for iOS.

1.5.0

Add support for 'Select Entire Screen' for React Navigation & React Native Navigation.

1.4.2

Place the handleCommand check under the DEBUG_FS_RN_FABRIC_THIRD_PARTY preprocessor variable to avoid runtime crashes experienced by some projects.

1.4.1

Updated the minimum version for the FullStory @fullstory/babel-plugin-react-native babel plugin to 1.1.0 for New Architecture support.

1.4.0

Added support for the React Native New Architecture (this includes support for Fabric and Turbo Native Modules). Refer to the New Architecture section of the FullStory React Native Getting Started guide for more information about minimum SDK and plugin versions.

1.3.0

Add support for FullStory Pages API. Set up tsconfig and update TypeScript types.

1.2.1

Fix Android Turbomodule backward compatability with RN versions <=0.64.

1.2.0

Add support for Turbo Native Modules with backward compatibility. Fix expo recordOnStart config. Update gradle configs.

1.1.2

Updated the minimum version for the FullStory @fullstory/babel-plugin-react-native babel plugin to 1.0.3 to fix attributes in RN 71. Add dependency overrides to fix npm audit warnings.

1.1.1

Fixed issues with TypeScript types. Thanks devon94 for reporting and supplying a fix.

1.1.0

Added support for Expo Managed Workflows.

1.0.7

Added FS.resetIdleTimer to the TypeScript types.

1.0.6

Added support for calling FS.resetIdleTimer. This release now requires a minimum FullStory plugin version of 1.14.0.

1.0.5

Updated the minimum version for the FullStory @fullstory/babel-plugin-react-native babel plugin to 1.0.2, to better work around metro server issues.

1.0.4

Updated the minimum versions for the FullStory babel plugins. Added a Typescript declaration for the FullStory base attributes. Added Typescript declarations for the FullStory API.

1.0.3

Added the ability to invoke the log API from within React Native. See more information here

1.0.2

Changed how the peer dependency for React Native is declared to better handle strict dependency checking

1.0.1

Link to a newer version of @fullstory/babel-plugin-annotate-react in order to fix React.Fragment and provide unimodules support

1.0.0

1.0.0 release!

0.9.4

Added support for the onReady method Added support for fsAttribute, fsTagName, data-component, data-element, and data-source-file Move the NativeProps hooking to this plug-in

0.9.3

Added README information about the private beta Require at least react-native version 0.61.0

0.9.2

Require at least version 0.9.2 of @fullstory/babel-plugin-react-native

0.9.1

README update

0.9.0

Initial Release