Plugin(s)
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
Plugin(s)
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
configparameter toSetupOptionsthat acceptsRecord<string, any>:Usage:
Benefits:
Alternative options
No response
Additional context
No response
Before submitting