User targeting is the ability to turn feature flags on and off to users with specific properties. For example, it is possible to apply a feature flag to all users who use Android among mobile operating systems.
However, users who are individually targeted users (via device ID or user ID) cannot be a part of audience targeting.
Additionally, users who have been individually targeted and targeted to users cannot be a part of the overall traffic allocation for the feature flag.
Check your SDK conditions
- 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).
When to set
You can set up your targeting settings whenever you want. All users are returned to [False] when the feature flag status is off.
However, keep in mind that if you set the feature flag when it is on, targeting will be applied to that user immediately after the settings are saved.
All usersis the default. This means that all users, except for the targeted individual, are eligible for traffic allocation.
Possible in both the
If you want to limit your audience to specific users, you need at least 1 rule.
You can have up to 10 rules for each target. Each rule is independent. Therefore, if only one of the rules is satisfied, the user becomes a target.
For example, if you want to target consumers who have purchased a new product, define a rule of "users who purchased a product belonging to the 'new product' category" and a rule of "users who purchased a product with the word 'new' within the product name". As long as one of the rules is satisfied, they will become a target.
A target group will have at least 1 condition from the point that it is created, and you can have up to 10 conditions for each target rule.
Each condition will have the AND operator applied and the targeting will only occur for a user that has all of the conditions satisfied. For example, 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. Hence depending on your needs, you will either add a target rule or a target rule condition within a target rule.
Conditions act on properties. Therefore, you should first integrate with the Hackle SDK and be able to collect the property keys and values to use.
For more information about properties, see the Properties document.
Both the target rules and conditions consist of a combination of
property name + operator + property value.
For example, if you want to target Android users among mobile operating systems in a situation where users' operating systems are being 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 created becomes the first (target) rule. Depending on whether you add another combination as an AND or an OR to these rules, you can create a target for a completely different user.
Let's take a closer look at the operators and AND/OR below.
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|
If you want to target a user who resides in Dallas city, you can define the following rule like this:
Creating a rule for [users residing in a metropolitan city]
- Property key: Region (The property value of the region is String type)
- operator: one of the following
- Property values for 'next' spoken by the operator: "Dallas Metropolitan City", "New York Metropolitan City", "Los Angeles Metropolitan City", "Chicago Metropolitan City", "Houston Metropolitan City", "Washington Metropolitan City"
The two AND and OR operands have the following meanings:
Both operands must be satisfied to be included in the targetted users.
For example, if 'Android users among mobile operating systems AND users with addresses in Seoul', only users with addresses in Seoul ** among users using mobile devices with Android operating systems are targeted.
If only one of the operands is satisfied, it is included in the targetted users.
For example, if 'Android users OR address in Seoul among mobile operating systems', users who use mobile devices with Android operating system or users whose address is in Seoul are targeted.
AND and OR operands in Hackle's targeting
- The AND operator is used when adding conditions to a rule. Since multiple conditions must be satisfied to be included in the target, the more AND operator is used, the narrower the target's scope.
- The OR operator is used when adding a rule. The more you use the OR operator, the wider the target, because if only one of the rules is satisfied, it is included in the target.
If you don't set a target, i.e. no rules specified, then all users, except those who are individually targeted, will be a part of the allocated traffic.
Drag the button or type in percentage to allocate traffic.
Save button on the top right corner to apply changes.
When setting, the values to be input or selected and the description of each button are as follows.
- Property key
- 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.
You can change the order of the rules if you have more than one rule, you can change the order. Use the dotted icon to the left of the rule name.
You can also customize the percentage directly (%) after determining the state of a rule.
Once you customized the percentage for the rule, the feature flag will only be applied that specific percentage of the target users that satisfy all the conditions of the rule.
As mentioned earlier, a single target rule can have up to 10 conditions, and your actual targeting can have up to 10 rules.
Don't forget that it's the AND operator when adding conditions, and the OR operator when adding rules.
After entering the necessary information to create the test and setting the targeting settings, click the
Save button to complete the setup.
If you set a target, it will have one or more rules.
Refer to the links below for User Identifier and Property of each SDK types.
Updated 2 months ago