@guidelytech/react-native 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -76,7 +76,7 @@ tasks).
76
76
 
77
77
  | | |
78
78
  |---|---|
79
- | `useGuidely()` | Client: `identify(id, traits?, account?)`, `setAccount`, `updateTraits`, `reset()`, `track(name, props?)`, `screen(name)`, `startGuide(idOrKey)`, `stopGuide()`, `dismissGuide()`, `openChecklist(key)`, `closeChecklist(key)`, `completeChecklistTask(key, taskId)`, `openResourceCenter()`, `closeResourceCenter()`, `refresh()`, `setConsent()`, `on(event, cb)`, `getGuides()`, `getActiveGuide()`, `getState()` |
79
+ | `useGuidely()` | Client: `identify(id, traits?, account?)`, `setAccount`, `updateTraits`, `reset()`, `track(name, props?)`, `screen(name)`, `startGuide(idOrKey)`, `stopGuide()`, `dismissGuide()`, `openChecklist(key)`, `closeChecklist(key)`, `completeChecklistTask(key, taskId)`, `openResourceCenter()`, `closeResourceCenter()`, `refresh()`, `setConsent()`, `on(event, cb)`, `getGuides()`, `getActiveGuide()`, `getState()`, `startSessionRecording()`, `stopSessionRecording()`, `isRecording()`, `getSessionId()` |
80
80
  | `useGuidelyReady()` | `true` once config is loaded |
81
81
  | `useGuidelyIdentify(id, traits?, account?)` | Identify when the signed-in user changes |
82
82
  | `useGuidelyScreen(name)` | Report a screen view from a component |
@@ -85,13 +85,13 @@ tasks).
85
85
  | `useChecklistProgress(key)`, `useGuideState(key)`, `useActiveGuide()` | Live state |
86
86
  | `<GuidelyTarget id>`, `useGuidelyTarget(id)` | Guide targets |
87
87
  | `<GuidelyScreenScope name>`, `guidelyScreenLayout` | Screen scoping for targets |
88
- | `<GuidelyMask>` | Keeps its children's text out of tap analytics |
88
+ | `<GuidelyMask>` | Keeps its children out of tap-analytics text and session recordings (it sets its own `nativeID`) |
89
89
 
90
90
  Provider props: `projectId`, `apiUrl`, `environment`, `storage`, `user`, `debug`, `analytics`,
91
91
  `consent` (`granted` / `pending` / `denied`), `appVersion` (for *App version* rules), `theme`,
92
92
  `configRefreshMs`, `onNavigate`, `onError`, `showChecklistLauncher` (default `true`),
93
93
  `showResourceCenterLauncher` (default `false`), `showMessengerLauncher` (default `true`), `insets`,
94
- `launcherOffset` (default 72), `autocapture`, `appBuild`.
94
+ `launcherOffset` (default 72), `autocapture`, `appBuild`, `sessionReplay`.
95
95
 
96
96
  ## Product analytics (autocapture)
97
97
 
@@ -157,6 +157,44 @@ native-stack headers, some third-party native views) may not reach JavaScript to
157
157
  then not captured. Coordinates are relative to the React Native root view (the window in a
158
158
  full-screen app).
159
159
 
160
+ ## Session replay
161
+
162
+ Records sessions for the dashboard's **Replays** player: masked screenshots (about one a second
163
+ while the screen changes), touches, screen views and Guidely events. Screenshots need native code,
164
+ so they come from a separate package; the SDK itself stays pure JavaScript (and works in Expo Go
165
+ without it).
166
+
167
+ ```bash
168
+ npm install @guidelytech/react-native-replay # then rebuild: expo prebuild / pod install / gradle
169
+ ```
170
+
171
+ ```tsx
172
+ <GuidelyProvider projectId="pk_prod_xxx" sessionReplay={{ enabled: true, maskAllText: true }} …>
173
+ ```
174
+
175
+ Recording needs both this option and *Session replay* turned on in the project settings, plus
176
+ analytics consent; the project's sample rate picks which sessions are recorded, and
177
+ `useGuidely().startSessionRecording()` / `stopSessionRecording()` force a session on or off.
178
+
179
+ **Masking** happens on the device before a frame is encoded. `TextInput`s are always painted over;
180
+ `maskAllText` (or the project's *mask all text* setting) covers every `Text`, `maskAllImages` every
181
+ `Image`, and `<GuidelyMask>` anything inside it. The keyboard is never recorded. Targets named in the
182
+ project's block selectors (`#<guidely id>`) are masked too. `maskAllText` also keeps text out of tap
183
+ analytics. Note that `<GuidelyMask>` hides its content from recordings, so wrap only what is
184
+ sensitive, not the whole app.
185
+
186
+ | Option | Default | |
187
+ |---|---|---|
188
+ | `enabled` | `false` | Record sessions |
189
+ | `maskAllText` | `false` | Paint over all text |
190
+ | `maskAllImages` | `false` | Paint over all images |
191
+ | `captureIntervalMs` | `1000` | Time between screenshots (min 500) |
192
+
193
+ Captures pause while a finger is down, follow 200 ms after it lifts and slow to one every 4 s while
194
+ the screen is idle. Chunks upload every 10 s and when the app goes to the background. iOS draws the
195
+ app's windows; Android uses `PixelCopy` (Android 8.0+), so `SurfaceView` content (some map views)
196
+ records as blank and `FLAG_SECURE` screens as a grey frame.
197
+
160
198
  ## Feature flags
161
199
 
162
200
  Built in, with the same `projectId` — nothing to configure: