-
-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Labels
featureFeature requestFeature requestneeds: triagepackage: posthogplatform: androidAndroid platformAndroid platformplatform: iosiOS platformiOS platformplatform: webWeb platformWeb platform
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's setup() method only accepts apiKey and host parameters, preventing developers from customizing other PostHog SDK options like autocapture, enable_recording_console_log, debug mode, etc.
This forces developers to accept default behavior or implement workarounds when they need custom PostHog configurations.
Preferred solution
Add an optional config parameter to SetupOptions that accepts Record<string, any>:
interface SetupOptions {
apiKey: string;
host?: string;
config?: Record<string, any>; // New parameter
}Usage:
await Posthog.setup({
apiKey: 'YOUR_API_KEY',
host: 'https://eu.i.posthog.com',
config: {
autocapture: false,
enable_recording_console_log: true,
debug: true,
},
});Benefits:
- Enables customization of any PostHog SDK option
- Cross-platform support (Web, Android, iOS)
- Backward compatible
- Future-proof for new SDK options
Alternative options
No response
Additional context
No response
Before submitting
- I have read and followed the feature request guidelines.
- I have attached links to possibly related issues and discussions.
Metadata
Metadata
Assignees
Labels
featureFeature requestFeature requestneeds: triagepackage: posthogplatform: androidAndroid platformAndroid platformplatform: iosiOS platformiOS platformplatform: webWeb platformWeb platform