Audience Targeting in Feature Flags
User targeting is the ability to enable or disable feature flags for users based on their specific properties. For example, a feature flag can be applied to all users on Android mobile operating systems.
However, users who are individually targeted (via device ID or user ID) cannot be included in audience targeting. Furthermore, users who have been individually targeted, or those targeted by audience rules, are excluded from the overall traffic allocation for that feature flag.
Check your SDK conditions
- Supported languages for targeting: Android, iOS, JavaScript, React, React Native, Java/Kotlin, Python, Node.js
- Supported versions for targeting: iOS and React Native are 2.0.0 or higher, others are 2.1.0 or higher
- For more information about SDK versions and their functions, refer to the What is a SDK? document.
Check your plan
- Targeting is only available for paid plans (Pro plan and above).
Targeting Policies
-
When to set
You can configure your targeting settings at any time. When a feature flag's status is off, all users will receive thefalse
value. However, if you configure the feature flag while it is on, targeting will be applied to users immediately after the settings are saved. -
Default
The default setting isAll users
. This means that all users, with the exception of individually excluded users, are eligible for traffic allocation. -
Environment
Targeting is possible in both theProduction Environment
andDevelopment Environment
. -
Rules
To limit your audience to specific users, you must define at least one rule. You can set up to 10 rules for each target, and each rule operates independently. Consequently, if even one of the rules is satisfied, the user will be included in the target. For example, to target consumers who have purchased a new product, you could define a rule for "users who purchased a product belonging to the 'new product' category" and another rule for "users who purchased a product with the word 'new' within the product name." If either of these rules is satisfied, the user becomes a target. -
Conditions
A target group must have at least one condition upon creation, and each target rule can have up to 10 conditions. All conditions within a rule are combined using the AND operator, meaning targeting will only occur if a user satisfies all conditions. For instance, if you target Android users among mobile operating systems and users in their 30s, both the conditions "users with Android mobile operating systems" and "users in their 30s" must be satisfied. Therefore, depending on your needs, you will either add a new target rule (OR logic) or add a condition within an existing target rule (AND logic). -
Properties
Conditions are based on properties. Therefore, you must first integrate with the Hackle SDK to collect the necessary property keys and values. For more information about properties, see the Properties document.
Composition of target rules and conditions
Important!Both the target rules and conditions consist of a combination of
property name + operator + property value
.
For example, to target Android users among mobile operating systems, assuming users' operating systems are collected via the property key osName
, you can create the following combination:
- Property Key:
osName
- Operator: One of the following
- Property Value:
Android
,android
The first combination you create forms the first (target) rule. By adding further combinations, either with an AND or OR operator, you can refine your target or include different user segments.
Let's take a closer look at the operators and AND/OR below.
Operator
Operators are used when setting conditions and serve to describe the relationship between property names and property values.
Hackle provides a total of 22 operators, you must select an appropriate operator according to the type of property value of the selected property name.
Please refer to the table below for more details.
Operator | Property Value Type | Possible Number of Property Values |
---|---|---|
Is any of | String | Multiple selections possible |
Is none of | String | Multiple selections possible |
Starts with any of | String | Multiple selections possible |
Starts with none of | String | Multiple selections possible |
Ends with any of | String | Multiple selections possible |
Ends with none of | String | Multiple selections possible |
Contains any of | String | Multiple selections possible |
Contains none of | String | Multiple selections possible |
= | Number | Multiple selections possible |
≠ | Number | Multiple selections possible |
> = | Number | Single selection allowed |
<= | Number | Single selection allowed |
> | Number | Single selection allowed |
< | Number | Single selection allowed |
When True | Boolean | Unselectable (operator includes property value 'True') |
When False | Boolean | Unselectable (operator includes property value 'False') |
version = | Version | Single selection allowed |
version ≠ | Version | Single selection allowed |
version > | Version | Single selection allowed |
version ≥ | Version | Single selection allowed |
version < | Version | Single selection allowed |
version ≤ | Version | Single selection allowed |
Example
If you want to target a user who resides in the city of Dallas, you can define the following rule:
Creating a rule for [users residing in a metropolitan city]
- Property key:
Region
(The property value of the region is String type)- Operator:
is any of
- Property values: "Dallas Metropolitan City", "New York Metropolitan City", "Los Angeles Metropolitan City", "Chicago Metropolitan City", "Houston Metropolitan City", "Washington Metropolitan City"
AND and OR
The two operators, AND and OR, have the following meanings:
-
AND
Both conditions must be satisfied for a user to be included in the targeted group. For example, if the conditions are 'Android users among mobile operating systems AND users with addresses in Seoul', only users who use Android mobile devices and whose address is in Seoul will be targeted. -
OR
If only one of the conditions is satisfied, the user is included in the targeted group. For example, if the conditions are 'Android users among mobile operating systems OR users with addresses in Seoul', users who use an Android mobile device or users whose address is in Seoul will be targeted.
AND and OR operators in Hackle's targeting
- The AND operator is used when adding conditions to a rule. Since multiple conditions must be satisfied for a user to be included in the target, the more AND operators are used, the narrower the target's scope.
- The OR operator is used when adding a rule. The more OR operators you use, the wider the target, because if only one of the rules is satisfied, the user is included in the target.
No target rules set (All Users)
If you don't set a target (i.e., no rules are specified), all users, except those who are individually targeted, will be included in the traffic allocation.

Drag the button or type in percentage to allocate traffic.

Click the Save
button on the top right corner to apply changes.
Setting up targeting rules on the dashboard

When configuring targeting rules, the values to be input or selected and the description of each button are as follows.
- Property key
- Operator
- Property value
- Delete rule
- Add an andconditions.
- Set the traffic of the rule.
- Add New Rule
- Set the percentage for the feature flag for the remaining amount of traffic that does not fall under the above rules.
If you click the + Add an AND condition
button in 5, a condition is added to Rule 1 as shown in the screenshot below.

-
If you have more than one rule, you can change their order. Use the dotted icon to the left of the rule name.
-
You can also directly customize the percentage (%) after defining a rule. Once you customize the percentage for the rule, the feature flag will only be applied to that specific percentage of target users who satisfy all the conditions of the rule.
As mentioned earlier, a single target rule can contain up to 10 conditions, and your overall targeting configuration can have up to 10 rules. Remember that conditions within a rule use the AND operator, while rules themselves are combined with the OR operator.
After entering the necessary information for the targeting setup and configuring the settings, click the Save
button to complete the process.
Set target (1 or more rules)
If you set a target, it will have one or more rules.

SDK Configuration
Refer to the links below for User Identifier and Property of each SDK types.
Java/Kotlin →
Python →
Node.js →
JavaScript →
React →
React Native →
Android →
iOS →
Unity →
Updated 18 days ago