Hi Shelagh,
Thank you for writing in.
Attribute targeting in GrowthBook can be used in both features and experiments, but they serve slightly different purposes in each context.
To summarize, while attribute targeting in both features and experiments involves setting user attributes and using them to determine who should see a feature or be included in an experiment, the key difference lies in how the targeting is applied. In features, it's used to enable or disable the feature for users who meet the attributes. In experiments, it's used to determine the pool of users who are eligible for the experiment, and then a subset of these users are actually enrolled in the experiment based on the traffic allocation.
*1. Feature Attribute Targeting:* In the context of features, attribute targeting is used to determine whether a feature flag should be enabled or not for a specific user. For example, you might want to enable a feature only for users from a specific country or users who have a certain attribute. You can set these attributes in the GrowthBook SDK and then use them in your feature targeting rules.
*2. In the context of experiments,* attribute targeting is used to determine which users should be included in an experiment. For example, you might want to run an experiment only on users from a specific country or users who have a certain attribute. Just like with features, you can set these attributes in the GrowthBook SDK and then use them in your experiment targeting rules.
However, there's an important distinction between attribute targeting in features and experiments. In experiments, the attribute targeting determines the pool of users who are eligible for the experiment. Then, a percentage of these users (based on the traffic allocation you set) are actually enrolled in the experiment.
For example, if you have an experiment rule set up that has attribute targeting and traffic set to 10%, it means that of all users who meet the attributes, 10% are selected and enrolled in the experiment.