View Source GrowthBook.FeatureRule (GrowthBook v0.3.0)
Struct holding Feature rule configuration.
Holds rule configuration to determine if a feature should be run, given the active
GrowthBook.Context.
Link to this section Summary
Link to this section Types
Specs
t() :: %GrowthBook.FeatureRule{
bucket_version: integer() | nil,
condition: GrowthBook.Condition.t() | nil,
coverage: float() | nil,
disable_sticky_bucketing: boolean() | nil,
fallback_attribute: String.t() | nil,
filters: [GrowthBook.Filter.t()] | nil,
force: term() | nil,
hash_attribute: String.t() | nil,
hash_version: integer() | nil,
key: String.t() | nil,
meta: [GrowthBook.VariationMeta.t()] | nil,
min_bucket_version: integer() | nil,
name: String.t() | nil,
namespace: GrowthBook.namespace() | nil,
parent_conditions: [GrowthBook.ParentCondition.t()] | nil,
phase: String.t() | nil,
range: GrowthBook.BucketRange.t() | nil,
ranges: [GrowthBook.BucketRange.t()] | nil,
seed: String.t() | nil,
variations: [term()] | nil,
weights: [float()] | nil
}
Feature rule
Overrides the default_value of a GrowthBook.Feature. Has a number of optional properties
condition(GrowthBook.Condition.t/0) - Optional targeting conditionparent_conditions(list ofGrowthBook.ParentCondition.t/0) - Each item defines a prerequisite where a condition must evaluate against a parent feature's value (identified by id). If gate is true, then this is a blocking feature-level prerequisite; otherwise it applies to the current rule only.coverage(float/0) - What percent of users should be included in the experiment (between 0 and 1, inclusive)force(term/0) - Immediately force a specific value (ignore every other option besides condition and coverage)variations(list ofterm/0) - Run an experiment (A/B test) and randomly choose between these variationskey(String.t/0) - The globally unique tracking key for the experiment (default to the feature key)weights(list offloat/0) - How to weight traffic between variations. Must add to 1.namespace(GrowthBook.namespace/0) - Adds the experiment to a namespacehash_attribute(String.t/0) - What user attribute should be used to assign variations (defaults toid)hash_version(integer/0) - The hash version to use (default to 1)range(GrowthBook.BucketRange.t/0) - A more precise version ofcoverageranges(list ofGrowthBook.BucketRange.t/0) - Ranges for experiment variationsmeta(list ofGrowthBook.VariationMeta.t/0) - Meta info about the experiment variationsfilters(list ofGrowthBook.Filter.t/0) - Array of filters to apply to the ruleseed(String.t/0) - Seed to use for hashingname(String.t/0) - Human-readable name for the experimentphase(String.t/0) - The phase id of the experimentfallback_attribute(String.t/0) - When using sticky bucketing, can be used as a fallback to assign variationsdisable_sticky_bucketing(boolean/0) - If true, sticky bucketing will be disabled for this experiment. (Note: sticky bucketing is only available if a StickyBucketingService is provided in the Context)bucket_version(integer/0) - An sticky bucket version number that can be used to force a re-bucketing of users (default to 0)min_bucket_version(integer/0) - Any users with a sticky bucket version less than this will be excluded from the experiment