Post Hog Config
The SDK Config
Constructors
Types
Properties
Hook for encrypt and decrypt events Devices are sandbox so likely not needed Defaults to no encryption
Evaluation contexts for feature flags List of contexts (e.g., "web", "mobile", "checkout") used to filter feature flag evaluations on the server side. Defaults to null
The maximum age of a feature flag cache record in memory in milliseconds Defaults to 5 minutes
The maximum size of the feature flag cache in memory Defaults to 1000
The maximum size of the feature flag called cache in memory. This cache prevents duplicate $feature_flag_called events from being sent by keeping track of per-user feature flag usage. Defaults to 1000
Interval in seconds for sending events over the wire The lower the number, most likely more battery is used Defaults to 30s
Enable local evaluation of feature flags When enabled, the SDK periodically fetches flag definitions and evaluates flags locally without making API calls for each flag check. Falls back to API if evaluation is inconclusive. Requires personalApiKey to be set. Defaults to false
Number of maximum events in a batch call Defaults to 50
Number of maximum events in memory and disk, when the maximum is exceed, the oldest event is deleted and the new one takes place Defaults to 1000
Hook that is called when feature flag definitions are loaded. This is called immediately if local evaluation is not enabled. Defaults to no callback
Personal API key for local evaluation Required when localEvaluation is true. Defaults to null
Interval in seconds for polling feature flag definitions for local evaluation Defaults to 30 seconds
Preload feature flags automatically Docs https://posthog.com/docs/feature-flags and https://posthog.com/docs/experiments Defaults to true
Preload PostHog remote config automatically Defaults to true
Send a $feature_flag_called event when a feature flag is used automatically Used by experiments