This guide is for React Native and Expo teams that use the UXCam React Native SDK, react-native-ux-cam, and want to move to Vexo.
To switch, you replace the UXCam package with vexo-analytics and call vexo() once with your API key. Vexo tracks screens on its own with React Navigation and Expo Router, so you can delete your manual screen tagging instead of porting it.
Uninstall the UXCam package and install vexo-analytics.
With Expo:
npm uninstall react-native-ux-cam
npx expo install vexo-analytics
With bare React Native:
npm uninstall react-native-ux-cam
npm install vexo-analytics
cd ios && pod install
In your entry file, replace the UXCam setup with a vexo() call. Call it at module scope, outside any component or useEffect, so tracking starts when the app starts. With Expo Router, the entry file is the root layout, app/_layout.tsx.
-import RNUxcam from 'react-native-ux-cam';
+import { vexo } from 'vexo-analytics';
+
+vexo('YOUR_API_KEY');
const App = () => {
- useEffect(() => {
- RNUxcam.optIntoVideoRecording();
- RNUxcam.startWithConfiguration({
- userAppKey: 'YOUR_APP_KEY',
- enableAutomaticScreenNameTagging: false,
- });
- }, []);
-
return (/* Your app */);
};
Delete your RNUxcam.tagScreenName calls, and replace or delete the other UXCam calls in your app. Use the API mapping to find each replacement.
Rebuild the app, because vexo-analytics includes native code. A JavaScript reload or an over-the-air update isn't enough. For the commands, see the Quickstart.
Expo: Vexo runs in a development build or an EAS Build. It doesn't run in Expo Go, because it needs custom native code. You don't need a config plugin. On Expo SDK 58, use vexo-analytics 1.14.0 or later. See Upgrading to Expo SDK 58.
| Task | UXCam | Vexo |
|---|---|---|
| Initialize | RNUxcam.optIntoVideoRecording(), then RNUxcam.startWithConfiguration({ userAppKey }) | vexo('YOUR_API_KEY') |
| Identify the user | RNUxcam.setUserIdentity(id) | identifyDevice(id). To make the device anonymous again, for example when the user signs out, call identifyDevice(null). |
| User properties | RNUxcam.setUserProperty(name, value) | No SDK call. Send traits from your backend with an identify. |
| Custom event with properties | RNUxcam.logEvent(name, properties) | customEvent(name, properties). Pass {} when the event has no properties. |
| Screen tracking | RNUxcam.tagScreenName(name) on each screen | Automatic with React Navigation and Expo Router. For other navigation, call trackScreen(name) on each screen change. |
| Global event properties | No documented call | registerProperties({ name: value }) adds the properties to every event in the session. A property of the same name in a customEvent call wins. |
| Opt out | RNUxcam.optOutOverall() and RNUxcam.optInOverall() | disableTracking() and enableTracking(). The choice persists across launches. |
| Session replay controls | RNUxcam.pauseScreenRecording() and RNUxcam.resumeScreenRecording() | No pause call. vexo('YOUR_API_KEY', { sessionReplay: false }) turns replay off on the device. { sessionReplaySampleRate: 0.1 } records about 10% of sessions. |
| Masking and privacy | RNUxcam.occludeSensitiveView(view), RNUxcam.occludeAllTextFields(true), and occlusions rules that overlay or blur named screens | Every replay frame is blurred on the device by default. No published release masks individual views yet. |
vexo-analytics masks individual views yet: VexoMask, VexoUnmask, and the masking option of vexo() are in the API, but they don't hide anything. Keep blur on if your app shows sensitive content.tagScreenName. Rebuild any funnels or reports that you based on UXCam screen names. Don't add trackScreen calls for a navigator that Vexo already tracks, or each screen counts twice.Your UXCam sessions, events, and users don't move to Vexo, and Vexo can't import them. Your Vexo history starts when the first build with vexo-analytics reaches your users.
To compare both tools before you remove UXCam, you can run both SDKs for a short cutover window: add vexo-analytics and the vexo() call next to your UXCam setup, and then remove UXCam in a later release. Vexo uses its own native modules, and it passes JavaScript errors on to any error handler that was installed before it. Both SDKs record the screen, though, so test the pair in a development build before you ship it.