-
-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Plugin(s)
- Accelerometer
- Android Battery Optimization
- Android Dark Mode Support
- Android Edge-to-Edge Support
- Android Foreground Service
- App Review
- App Shortcuts
- App Update
- Asset Manager
- Audio Recorder
- Background Task
- Badge
- Barometer
- Bluetooth Low Energy
- Cloudinary
- Contacts
- Datetime Picker
- File Compressor
- File Opener
- File Picker
- Live Update
- Managed Configurations
- NFC
- Pedometer
- Photo Editor
- Posthog
- Printer
- Screen Orientation
- Screenshot
- Speech Recognition
- Speech Synthesis
- SQLite
- Torch
- Zip
Current problem
The PostHog plugin lacks built-in support for error tracking capabilities, which is an essential feature available in the native PostHog SDKs. Users cannot easily enable exceptions capturing without manually implementing workarounds.
Preferred solution
Add native error tracking features to the PostHog Capacitor plugin with:
-
Error Tracking:
captureException()- Capture and track exceptions with optional propertiesautoCaptureExceptions- Add exceptions auto capture to Android
-
Cross-Platform Support:
- Implement using PostHog JS SDK for web
- Implement using PostHog iOS SDK for iOS
- Implement using PostHog Android SDK for Android
This solution provides a consistent API across all platforms and follows PostHog's official SDK patterns.
Alternative options
-
Manual Implementation: Users could manually integrate PostHog SDKs alongside the Capacitor plugin, but this creates complexity and inconsistency.
-
Third-Party Plugins: Use separate plugins for error tracking, but this doesn't integrate well with PostHog's analytics.
-
Web-Only Solution: Only implement for web platform using PostHog JS, but this leaves mobile platforms unsupported.
Additional context
- Error tracking integration provides better context when exceptions occur during recorded sessions
- All features are opt-in and maintain backward compatibility with existing implementations
Before submitting
- I have read and followed the feature request guidelines.
- I have attached links to possibly related issues and discussions.