Features
- Rich Native Context: Automatically collects device, app, and system information
- Privacy-First: GDPR/CCPA compliant with optional device ID collection
- Offline Queue: Events are persisted and retried when network is available
- Lightweight: Minimal impact on app size (~100KB total)
- Type-Safe: Full TypeScript support with comprehensive type definitions
- Auto Screen Tracking: Optional helpers for Expo Router and React Navigation
- Graceful Fallback: Works without native modules (Expo Go compatible)
Installation
Step 1: Install Package & Dependencies
Step 2: Platform Setup
Choose your platform setup based on your React Native environment:- React Native CLI
- Expo Development Build
- Expo Go
iOS:Android:
- Add native module to
android/app/src/main/java/.../MainApplication.java
:
- Add permission to
android/app/src/main/AndroidManifest.xml
:
- Rebuild your app:
Step 3: Verify Installation
Test that native modules are working:Quick Start
Basic Setup
https://your-edgee-host.com
with the URL provided in the Edgee console, in the project overview section.
Track Events
Consent Management (Optional)
- Transparent: No need to check consent before each tracking call
- Auto-sync: Consent events automatically sent to your Edgee server
- Persistent: Consent preference stored locally and remembered
- Compliant: GDPR/CCPA ready with proper consent management
Rich Native Context
With native modules enabled, each event automatically includes comprehensive context:App Information
- App name, version, build number
- Bundle/package identifier
- Installation and update timestamps
Device Information
- Device model, manufacturer, brand
- Screen dimensions, density, scale
- Hardware capabilities (tablet, simulator/emulator detection)
System Information
- OS name and version
- Locale, language, country, timezone
- Memory usage, storage info
- Battery level and state (iOS)
Network Information
- Connection type (WiFi, cellular, ethernet)
- Carrier name and network codes
- Radio technology (3G, 4G, 5G)
Privacy Information (Optional)
- Advertising ID (with proper consent on iOS 14+)
- Device ID (privacy-compliant, opt-in only)
- Tracking authorization status
React Integration
Context Provider (Recommended)
Consent Hook
Auto Screen Tracking
- Expo Router
Configuration
Privacy Considerations
- Device ID Collection: Only enable
collectDeviceId: true
if you need persistent device tracking - iOS Advertising ID: Automatically respects App Tracking Transparency (iOS 14+)
- GDPR/CCPA Compliance: All sensitive data collection is optional and clearly documented
Advanced Usage
Manual Native Context Access
Context Caching
Troubleshooting
Common Issues
Module not found Error
Module not found Error
iOS:Android:
- Ensure
EdgeeReactNativePackage
is added toMainApplication.java
- Clean build:
cd android && ./gradlew clean && cd ..
No Native Context in Events
No Native Context in Events
-
Check if native modules are available:
-
If
false
, verify platform setup above - In Expo Go, this is expected (use Expo Development Build)
Build Errors
Build Errors
Clean everything:
Debug Mode
Enable debug logging to see what’s happening:Compatibility
Platform | Version | Native Context | Auto-Linking |
---|---|---|---|
React Native | 0.72+ | ✅ Full | iOS: ✅ Android: Manual |
iOS | 11.0+ | ✅ Full | ✅ CocoaPods |
Android | API 21+ | ✅ Full | ⚠️ Manual setup |
Expo Dev Build | Latest | ✅ Full | ✅ Automatic |
Expo Go | Latest | ⚠️ Fallback | N/A |