Target groups of users with rules

Written by Julie Trenque

Updated on 11/22/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 Kameleoon’s pre-existing conditions available depending on which SDK you’re using:

  • Browser: Includes or excludes visitors according to their browser and their version.
  • Device: Includes or excludes visitors according to their devices (smartphone, tablet, etc.).
  • Conversion: Includes or excludes visits during which a specific goal was converted.
  • Custom Data: Includes or excludes visits according to the value of a custom data.
  • Page URL: Includes or excludes visitors according to the URL of the page displayed.
  • Page Title: Includes or excludes visitors according to the title of the page displayed.
  • SDK Language: Includes or excludes visitors according to their languages.
  • Visitor Code: Includes or excludes visitors using a unique visitor code.
  • App Version: Includes or excludes visitors on specific app versions.
  • Browser Cookie: Includes or excludes visitors according to the presence of a cookie in their browser, and possibly its value.
  • Operating System: Includes or excludes visitors according to their operating system (Windows, Mac, OS, …).
  • IP Geolocation: Includes or excludes visitors according to their country, region, or town.
  • Segment: Includes or excludes visitors according to the Kameleoon segment already created.
  • Previous Page: Includes or excludes visitors according to the URL of the previous page.
  • Number of Page Views: Includes or excludes visitors that have seen a specific amount of pages.
  • Time since First Visit: Includes or excludes visitors according to the time elapsed since their first visit.
  • Time since Last Visit: Includes or excludes visitors according to the time elapsed since their last visit.
  • Number of Visits Today: Includes or excludes visitors according to the amount of their visits today.
  • Total Number of Visits: Includes or excludes visitors according to the total amount of their visits.
  • New or Returning Visitors: Allows you to include only new visitors or only returning visitors on your website.
  • Exclusive Feature Flag: Includes only users who are not included in any ongoing rollout or feature/web experiment.
  • Targeted Feature Flag: Includes or excludes visitors who have already been targeted by another feature flag and exposed to a variation.

Note: These conditions are only available for limited SDKs but coming soon to all. Check your SDK’s available conditions in the developer documentation (Javascript documentation, for example). 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.