Plugin(s)
Current problem
The PostHog plugin lacks built-in support for session replay, which is an essential feature available in the native PostHog SDKs. Users cannot easily enable session recording without manually implementing workarounds.
Preferred solution
Add native session replay features to the PostHog Capacitor plugin with:
-
Session Recording Methods:
startSessionRecording() - Start recording user sessions with configurable options
stopSessionRecording() - Stop recording user sessions
-
Configuration Options:
enableSessionReplay - Auto-enable session recording on plugin initialization
sessionReplayConfig - Add session replay config map
-
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 session recording, 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
- Session replay is a critical feature for debugging user experience issues and understanding user behavior
- The implementation follows PostHog's official documentation for each platform:
- All features are opt-in and maintain backward compatibility with existing implementations
Before submitting
Plugin(s)
Current problem
The PostHog plugin lacks built-in support for session replay, which is an essential feature available in the native PostHog SDKs. Users cannot easily enable session recording without manually implementing workarounds.
Preferred solution
Add native session replay features to the PostHog Capacitor plugin with:
Session Recording Methods:
startSessionRecording()- Start recording user sessions with configurable optionsstopSessionRecording()- Stop recording user sessionsConfiguration Options:
enableSessionReplay- Auto-enable session recording on plugin initializationsessionReplayConfig- Add session replay config mapCross-Platform Support:
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 session recording, 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
Before submitting