getFeatureFlagResult

open override fun getFeatureFlagResult(distinctId: String, key: String, groups: Map<String, String>?, personProperties: Map<String, Any?>?, groupProperties: Map<String, Map<String, Any?>>?, sendFeatureFlagEvent: Boolean?): FeatureFlagResult?

Returns the feature flag result containing both value and payload. Docs https://posthog.com/docs/feature-flags and https://posthog.com/docs/experiments

Return

FeatureFlagResult if the flag exists, null otherwise

Parameters

distinctId

the distinctId

key

the Key

groups

groups for group-based flags

personProperties

person properties for flag evaluation

groupProperties

group properties for flag evaluation

sendFeatureFlagEvent

whether to send the $feature_flag_called event, or null to use config default