Target groups of users with rules

Written by Julie Trenque

Updated on 07/07/2023

1 min

Advanced

Was this content useful?

For any type of rule that you select, the first step you see is a Targeting section that allows you to select an existing segment or create a new one.  

By default, the target is set to All users, but you can choose from a drop-down of existing segments or create a new one by clicking the button below it.

If you wish to create a new segment or add precise targeting conditions for choosing your audience, you can use some pre-existing conditions available depending on which SDK you’re using. 

Note: Currently, these conditions are only available for limited Web SDKs (JavaScript, Node.js, React, Java and Go), and coming soon to other SDKs. You can combine several targeting conditions if needed to target any variety of your users.

The next step is to choose the exposure rate for this rule i.e what percentage of your chosen segment will be exposed while the flag is turned on. 
In the example above, 50% of Power users will be evaluated for this rule.

Technical note: You’ll need to call the addData() method of our SDK to associate custom data or attributes available in the Segment builder, like the device type, browser, page URL, page title. Many more conditions such as Visitor Code, Browser and SDK Language are natively available and do not need any additional setup.

We also provide native integrations with Mixpanel, Segment or GA4 to retrieve external cohorts and use them in Kameleoon segments. 

You’ll need to call the getRemoteData() method in your source code to automatically retrieve external segments associated with the user. For the Goal converted, you’ll need to call the trackConversion method. 

Lastly, it’s important to note that the data, on which the targeting will be based, is stored in the RAM of the server hosting the SDK for server-side SDKs and in the browser’s LocalStorage for web client-side SDKs. You can read more about it here.