onboardlytics-react-native
v0.1.0
Published
React Native analytics SDK with auto-tracking for onboarding intelligence
Downloads
7
Maintainers
Readme
@onboardlytics/react-native
React Native analytics SDK with auto-tracking for onboarding intelligence. Simple like Bugsnag - just capture everything, let the LLM figure out what it means.
🚀 Quick Start
npm install @onboardlytics/react-native
# or
yarn add @onboardlytics/react-nativeimport Onboardlytics from '@onboardlytics/react-native';
// That's it! Just start() - config is read from native files
// Just like Bugsnag - no config needed!
Onboardlytics.start();
// Optional: Manual tracking
const onboardlytics = Onboardlytics.getInstance();
onboardlytics?.notify('button_clicked', {
buttonId: 'signup',
screen: 'Welcome',
});
onboardlytics?.setUser('user-123');Native Configuration (Like Bugsnag)
Android - Add to android/app/src/main/AndroidManifest.xml:
<application>
<meta-data
android:name="com.onboardlytics.android.API_KEY"
android:value="your-api-key-here" />
</application>iOS - Add to ios/YourApp/Info.plist:
<key>onboardlytics</key>
<dict>
<key>apiKey</key>
<string>your-api-key-here</string>
</dict>Or pass config manually to override:
Onboardlytics.start({
apiKey: 'your-api-key', // overrides native config
});📋 Features
- ✅ Simple API - Just
notify()everything, LLM analyzes it - ✅ Auto-tracking - Navigation (Week 3), interactions (Week 5), API calls (Week 4)
- ✅ Event Queue - Local persistence with batching (Week 2)
- ✅ Offline Support - Queue events when offline, flush when back online (Week 6)
- ✅ Privacy-First - Configurable anonymization and opt-out (Week 7)
- ✅ TypeScript - Full type safety
- ✅ Lightweight - Minimal performance impact
Auto-track Navigation
If you're using React Navigation, automatically track screen views:
import { NavigationContainer } from '@react-navigation/native';
import { useNavigationTracker } from '@onboardlytics/react-native';
function App() {
const trackNavigation = useNavigationTracker();
return (
<NavigationContainer onStateChange={trackNavigation}>
{/* your navigation */}
</NavigationContainer>
);
}That's it! All screen transitions are automatically tracked as screen_view events.
🧪 Testing
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage🛠 Development Roadmap
- Week 1 ✅ Foundation & Core Setup
- Week 2 ✅ Event System + Queue
- Week 3 ✅ Navigation Tracker
- Week 4 🔄 Network Interceptor
- Week 5 👆 Interaction Tracker
- Week 6 💣 Crash Handler + Offline Mode
- Week 7 🔒 Performance + Privacy Layer
- Week 8 📦 QA, Docs, and MVP Launch
📚 Documentation
Full documentation coming in Week 8.
🤝 Contributing
Contributions welcome! This is an early-stage project.
📄 License
MIT
