@fullstory/segment-react-native-plugin-fullstory

中文文档
1.0.1发布于 2023/05/13MITTypeScriptESM + CJS近 30 天下载 4.5万

Integrate FullStory with your Segment analytics in your React-Native app.

原始使用文档
文档目录8 节
  1. Prerequisite
  2. Setting up FullStory
  3. Setting up Segment
  4. Installation
  5. Usage
  6. Configurations
  7. Example
  8. License

@fullstory/segment-react-native-plugin-fullstory

CircleCI

EnrichmentPlugin for FullStory. This is a segment analytics plugin that wraps @fullstory/react-native.

Prerequisite

Setting up FullStory

Please make sure that your application is correctly set up with FullStory. See FullStory's React Native documentation to get started.

Setting up Segment

This plugin works in conjunction with @segment/analytics-react-native. Follow Segment's installation instructions.

Installation

Install the @fullstory/segment-react-native-plugin-fullstory and @fullstory/react-native dependencies.

yarn add @fullstory/segment-react-native-plugin-fullstory @fullstory/react-native
# or
npm install --save @fullstory/segment-react-native-plugin-fullstory @fullstory/react-native

Run pod install after the installation to autolink the FullStory SDK.

Usage

In your code where you initialize the analytics client call the .add({ plugin }) method with an FullStoryPlugin instance.

// App.js

import { createClient } from '@segment/analytics-react-native';
import { FullStoryPlugin } from '@fullstory/segment-react-native-plugin-fullstory';

const segmentClient = createClient({
  writeKey: 'SEGMENT_WRITE_KEY',
});

const plugin = new FullStoryPlugin({
  // configurations
  enableFSSessionUrlInEvents: true,
});

segmentClient.add({ plugin });

Configurations

The plugin accepts a configuration object with the following properties:

PropertyDescription
enableFSSessionUrlInEventsInsert FS session URL to Segment event properties. Defaults to true.
allowlistAllTrackEventsSend all track events as FS custom events. Defaults to false.
enableIdentifyEventsEnable Segment identify events to be sent as FS identify events. Defaults to true.
allowlistTrackEventsAn array of event names to allow to send to FullStory. To allowlist all events, use allowlistAllTrackEvents.
enableSendScreenAsEventsSend screen events as FS custom events. Defaults to false.
enableGroupTraitsAsUserVarsEnable group event traits to be passed into FS user vars. Defaults to false.

Example

We included a simple react native app that implements the plugin under ./example. See example README for additional instructions.

License

MIT

版本与发布记录

@fullstory/segment-react-native-plugin-fullstory 共发布 2 个版本,首次发布于 2023/01/27;过去 12 个月发布了 0 个版本。

版本发布日期距今
1.0.1latest2023/05/133 年前
1.0.02023/01/273 年前

关于 @fullstory/segment-react-native-plugin-fullstory 的常见问题

@fullstory/segment-react-native-plugin-fullstory 是什么?

Integrate FullStory with your Segment analytics in your React-Native app.

如何安装 @fullstory/segment-react-native-plugin-fullstory?

在项目目录运行 npm install @fullstory/segment-react-native-plugin-fullstory,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@segment/analytics-react-native(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@fullstory/segment-react-native-plugin-fullstory 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@fullstory/segment-react-native-plugin-fullstory 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@fullstory/segment-react-native-plugin-fullstory 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=12。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@fullstory/segment-react-native-plugin-fullstory 可以商用吗?

@fullstory/segment-react-native-plugin-fullstory 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fullstory/segment-react-native-plugin-fullstory 的下载量有多少?

根据 npm 官方下载统计,@fullstory/segment-react-native-plugin-fullstory 在 2026/10/16 – 2026/11/14 这 30 天内被下载 44,952 次,日均约 1,498 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fullstory/segment-react-native-plugin-fullstory 还在维护吗?

最新版本 1.0.1 发布于 2023/05/13(3 年前);至今共发布 2 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/01/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。