vexo-analytics
v1.9.0
Published
The analytics tool for React Native.
Readme
vexo-analytics
Vexo is the first React Native out of the box tool for analytics. We provide a solution for precise and actionable data with a seamless integration and zero-configuration, zero-coding support.
Quickstart
Prerequisites
- Using React Navigation or Expo Router
Expo
- ✅ You can use this library with Development Builds. No config plugin is required.
- ❌ This library can't be used in the "Expo Go" app because it requires custom native code.
Getting started
Create an account here
You'll be prompted into creating a new app, give it a cool name (you will be able to change that later) and once you submit it, you'll be given an API key.
Run
npx expo install vexo-analyticsif you are using Expo, oryarn add vexo-analytics/npm install vexo-analyticsotherwise. If you are using bare React Native, runpod installin the iOS folder.Add the following code to your app entry file (usually
index.js,App.jsor_layout.tsxif you're using Expo Router):import { vexo } from 'vexo-analytics'; // You may want to wrap this with `if (!__DEV__) { ... }` to only run Vexo in production. vexo('YOUR_API_KEY');Re-build and run your app (the
vexo-analyticspackage includes native code).Go to your app's page on Vexo and you should see your first event!
Wait, that's it? Yes! That's it. With that ease of integration experience you get an incredible set of features, go check them out!
Navigation integration & supported versions
vexo() auto-attaches to your navigation library by wrapping its container's render. All navigation integrations are optional peer dependencies — installing vexo-analytics in an app without @react-navigation/native produces no peer warnings.
| Integration | Supported | Notes |
|---|---|---|
| @react-navigation/native | 5 – 7 | Optional peer. Example app runs v7. |
| Expo Router | v1 – v4 | Via internal shims (expo-router/{src,build}/fork/NavigationContainer). v5+ (SDK 53+) not yet verified — if auto-attach fails there, use the explicit wrap below. |
| react-native | * (tested floor: 0.74) | New Architecture status is tracked in #67. |
| react | * (tested: 18) | |
Explicit wrap (escape hatch): if auto-attach warns that it could not patch your navigation library (frozen module exports, an unsupported version, or no library at all), wrap the container yourself — this uses only public react-navigation APIs and no patching:
import { VexoProvider } from 'vexo-analytics';
import { NavigationContainer } from '@react-navigation/native';
export default function App() {
return (
<VexoProvider apiKey="YOUR_API_KEY" container={NavigationContainer}>
<RootNavigator />
</VexoProvider>
);
}When auto-attach cannot patch a library it found, it logs a dev-mode warning and cleanly no-ops instead of crashing; with no navigation library at all, vexo() logs an error at render time.
User consent & session replay
Vexo records user sessions (screens, taps, navigation). Under App Review Guideline 2.5.14, apps that record user activity must obtain explicit user consent and provide a clear visual indication that recording is taking place. Similar obligations apply under GDPR/CCPA. You, the app developer, are responsible for the consent flow; the SDK gives you the switches:
Consent-gated initialization (recommended): don't call
vexo(apiKey)until the user has consented. Nothing is recorded or sent beforevexo()runs.import { vexo, enableTracking, disableTracking } from 'vexo-analytics'; if (userHasConsented) { vexo('YOUR_API_KEY'); }Opt-out at runtime:
disableTracking()stops event collection and session recording (it also stops an in-flight recording); the choice is persisted across launches.enableTracking()turns it back on (recording resumes with the next session).Visual indication: the SDK does not render a recording indicator; show your own persistent indicator while tracking is enabled to satisfy 2.5.14.
Masking: captured screenshots are blurred by default (the isBlurred device config, controlled from the Vexo dashboard, defaults to on). There is currently no API to exclude or mask individual views (e.g. a specific TextInput) — treat any screen you can't blur as sensitive and keep isBlurred on.
PII: identifyDevice(email) attaches the email to the device record on Vexo's servers. Only call it with the user's consent, and route deletion requests to Vexo support.
Store compliance notes
- iOS Privacy Manifest: the pod ships a
PrivacyInfo.xcprivacydeclaring its required-reason API usage (NSUserDefaults CA92.1, file timestamps C617.1) and collected data types (product interaction, device ID, user ID, crash/performance/diagnostic data; no tracking). Include Vexo's data collection in your App Store privacy nutrition label. - Android 16 KB page sizes: the SDK's native dependencies are 16 KB-aligned (Google Play requirement for updates from 2027-02-01), enforced by a Gradle version floor on
co.vexo:renderscript-intrinsics-replacement-toolkit(>= 0.8.1) plus a CI alignment check. If you build with AGP < 8.5.1, check your APK/AAB packaging (useLegacyPackaging) so aligned libraries stay uncompressed and page-aligned.
Development
yarn test— unit tests (Jest, React Native preset).maestro test .maestro/smoke.yml— E2E smoke flow (Maestro); build and install the example app on a running emulator/simulator first. Not wired into CI yet (needs an emulator job).- CI runs on GitHub Actions (
.github/workflows/ci.yml). Releases and native SDK builds are documented in CONTRIBUTING.md; changes are tracked in CHANGELOG.md.
