Create a new segment

portrait de l'auteur Julie Trenque

Written by Julie Trenque

Updated on 05/13/2022

5 min

Beginner

Was this content useful?

Segmentation helps you to precisely target your visitors. You can create, modify and duplicate segments with the Segment Builder, a tool in Kameleoon App.

Access Segment Builder

From your preferences

To access the Segment Builder from your Kameleoon App, in the left-hand sidebar menu, go to “Configure” > “Segments”.

To create a new segment, click on “New segment”.

The segment creation pop-in will open.

From the personalization creation page

You can also access Segment Builder while creating or editing a personalization, by clicking “Add a new segment” in the “EXPOSED SEGMENT” section.

The segment creation pop-in opens.

Create a new segment

Types of targeting

Kameleoon offers a priori segmentation, in advance of your experiment launch. There are two options, so it’s important to understand the difference between a priori and a posteriori segmentation.

  • A posteriori segmentation takes place after the test, in your web analytics solution (Google Analytics, KISSmetrics, AT Internet, etc.). This will only show you if a variation’s performance has increased with a given segment. Kameleoon doesn’t manage this kind of segmentation, which is usually undertaken by your web analytics solution.
  • A priori targeting is different. The experiment is limited to a specific fragment of your traffic, usually because the test only makes sense for this segment. For instance, if you have an international website, it might be interesting to run an experiment only for users in France. Similarly, you could test an offer with an experiment only displayed to a specific segment (for example, first-time visitors to your website). This kind of targeting is managed by Kameleoon.

Experiments for a specific segment are very simple with Kameleoon. You can display a special offer only to a specific visitor segment (for example, visitors coming to your website for the first time, users arriving on your page via your Twitter account, etc.)

Enter your segment’s name and description

The first fields to fill in are the site for which you are creating this segment and the name you want to give it. You can also add a description and tags.

The description isn’t mandatory but is strongly recommended so that you can quickly identify your segments in the list.

Select and set a condition

To add a condition, simply drag and drop a condition from the left-hand list into the field on the right.

Once you have dragged and dropped a condition, its specific settings will be displayed.

Configure the condition you added as you wish. The different available conditions will be detailed below.

Determine the weight

For each condition, a weight icon enables you to prioritize them: the higher the number, the more important the condition. This setting is for advanced use only and not mandatory.

By default, all conditions have a weight of 1.

You can learn more about weight and how works in our articles on Exposure settings and How to use the weight of conditions?

Delete the condition

To delete a condition, click on the cross next to the weight icon.

Narrow or add a new condition

To add a new condition when a condition is already selected, two options are available:

  • Narrow an existing condition: further specifies a condition. This corresponds to the addition of mathematical parentheses: (Condition A and Condition B) and Condition C
  • Add a new condition: adds a condition at the same level: Condition A and Condition B and Condition C

For more information, please refer to our article Narrow a condition or add a new one?

Targeting conditions

Kameleoon offers a large number of conditions that enable you to include or exclude all types of visitors.

Visited pages

  • Page URL: includes or excludes pages based on their URL or URL fragment. (only available in the Personalization module)
  • Page Title: includes or excludes pages by title.

With these two options, you can target one or several specific page(s). This can be useful if you want to change HTML elements shared by several pages. If you target the URL or the title of the page, Kameleoon displays the variation for users of these pages only.

With Kameleoon, you can target any kind of URL thanks to regular expressions. For examples of regular expressions, please read our article about them.

Note: For URL targeting using the “Contains” option: If your expression does not start with http or https, Kameleoon will only check the presence of the expression in the path (i.e. everything after the domain name).

Be careful: URL fragments and regular expressions are case sensitive.

Acquisition

Thanks to these options, you will be able to make commercial offers to users who looked for a specific keyword in a search engine such as Google, or to users who clicked on one of the emails sent by your marketing team, etc.

Note: You need to be careful with the “Visitor data” and “Traffic acquisition” targeting options. These options are mostly useful for personalization (for example, displaying a commercial offer only to non-buying regular visitors) and need to be combined with another condition such as URL targeting.

  • Landing page URL: includes or excludes visitors based on the URL of their landing page.
  • Referring URL: includes or excludes visitors based on the referring URL.
  • Traffic type: includes or excludes visitors from a type of website (search engine, emailing, website tributary, etc.).
  • Acquisition channel: includes or excludes visitors according to the provenance channel. (only available in the Personalization module)

Visitor characteristics

  • New or returning visitors: includes only new visitors (first visit) or those returning to your website.
  • Browser language: includes or excludes visitors according to the language set in their web browser.
  • Geolocation: includes or excludes visitors according to geolocation data (country, region, town).
  • Device type: includes or excludes visitors based on their type of device (tablet, smartphone, computer). You can also find this feature on the page for personalization creation. (only available in the Personalization module)
  • Screen resolution: includes or excludes visitors by the size of their screen (in pixels).
  • Ad blocker: includes or excludes visitors using an ad blocker. (only available in the Personalization module)
  • Visitor IP address: includes or excludes visitors based on their IP address.
  • Exclusive test: includes only visitors who are not participating in any other live experiments.

Use this option if, for example, you want to make a commercial offer only to users who visited your website more than 5 times during the day, or to new visitors.

Visiting behavior

  • Previous page: includes or excludes visitors according to the URL of the previous page. (only available in the Personalization module)
  • Key pages: includes or excludes visitors that have visited a specific key page. (only available in the Personalization module)
  • Number of page views: includes or excludes visitors according to the number of pages previously visited. (only available in the Personalization module)
  • Time elapsed since first visit: includes or excludes visitors according to the time elapsed since their first visit. (only available in the Personalization module)
  • Time elapsed since last visit: includes or excludes visitors according to the time elapsed since their last visit. (only available in the Personalization module)
  • Time elapsed since session became active: includes or excludes visitors according to the time elapsed since the beginning of the session. (only available in the Personalization module)
  • Time elapsed since page load: includes or excludes visitors according to the page loaded.
  • Number of visits today: includes or excludes visitors according to the amount of their visits today. (only available in the Personalization module)
  • Total number of visits: includes or excludes visitors according to the total amount of their visits. (only available in the Personalization module)
  • Number of visits by page: includes or excludes visitors according to the total amount of their visits on the specific page. (only available in the Personalization module)
  • Website exit: includes visitors whose cursor has left the browser window.
  • Goal converted: includes or excludes visits during which a specific goal was converted. (only available in the Personalization module)
  • Product pages: includes or excludes visitors based on previously visited product pages. (only available in the Personalization module) Further information

The “Product pages” category contains 3 targeting conditions:

1. Price of the product page displayed: includes or excludes product pages where price is higher than / lower than / equals a certain amount (a fixed price / the price of a specific product / the average price of a selection of products).

2. Number of visited product pages: includes or excludes visitors based on the number of product pages they visited, the category to which these pages belong and their price.

3. Visited product pages: includes or excludes visitors based on the product pages they visited.

If you are using Shopify Plus, the Product Pages conditions are automatically available without any additional configuration. Read our documentation

Predictive targeting

Kameleoon Conversion Score: our machine-learning algorithms predict each visitor’s purchase or engagement intention in real-time. You can use the Kameleoon Conversion Score (KCS™) to automatically trigger personalization campaigns. (only available in the Personalization module)

Campaign

This set of conditions enables you to include or exclude visitors who have seen or not a campaign (experiment/personalization) or variation.

  • Experiment: includes or excludes visitors who have previously been exposed to a specific experiment and have seen “a specific variation” OR “any of the variations” (including the original). The condition considers the current visit or the previous ones. The selected experiment can be Online, Paused or Stopped.
  • Personalization: includes or excludes visitors who have previously been exposed to a specific personalization. The condition considers the current visit or the previous ones. The selected personalization can be Online, Paused or Stopped.
  • Exclusive campaign: excludes visitors already taking part in an experiment, a personalization, or both. With this condition, you can target visitors who are not participating in any other ongoing campaign.

Note: If one of your campaigns or variations is used as a targeting condition in a segment, it cannot be deleted.

External environment

  • Sky condition: includes or excludes visitors according to the weather in their location. (only available in the Personalization module)
  • Temperature: includes or excludes visitors exposed to average temperatures. (only available in the Personalization module)
  • Day / Night: includes or excludes visits during day or night. (only available in the Personalization module)
  • Sky condition forecast: includes or excludes visitors who will be exposed to the following sky conditions. (only available in the Personalization module)
  • Temperature forecast: includes or excludes visitors who will be exposed to the following temperatures. (only available in the Personalization module)
  • Date range: includes or excludes visitors to the website during a given time period (in days).
  • Timeslot: includes or excludes visitors to the website within a given time period (during the day).

Custom data

This set of conditions enables you to include or exclude visits based on custom data. For more information, see the article on advanced targeting tools.

If you have set values when creating your custom data, you can select these values in the segment builder. Choose the option “is among the values” in the dropdown and check the value(s).

Technical

  • Custom JavaScript condition: you can write a custom JavaScript function that will return “True” or “False”. If the result is “True”, the visitor is included in the experiment. This function can be evaluated: each time the page is displayed; or asynchronously.
    • Check condition immediately or when the page has loaded: if you return undefined, then your code will be executed again (every 75 ms for the first 3 seconds after the first attempt, then every 250 ms).
    • Run the condition asynchronously: your JavaScript is evaluated for each experiment. For example, you want to run an experiment and you’re waiting for a response from a web service.
    • If you want to return true or false depending on the value of a variable in your data layer, you can use that code (which you need to adapt depending on your data layer name):
if (typeof utag_data != "undefined" && typeof utag_data.is_logged_in != "undefined" && utag_data.is_logged_in != ""){
if (utag_data.is_logged_in == "false")
return false;
else
return true;
}
return undefined; // will loop until utag_data and utag_data.is_logged_in is defined

If you are using the asynchronous condition, the callback function is setTargeting. You need to replace it in the code: setTargeting(true) / setTargeting(false)

  • Browser cookie: includes or excludes visitors based on the presence of a cookie in their browser and, if possible, its value.
  • Custom event: starts a personalization only when a specific event has been triggered. To trigger an event, use the Kameleoon.API.Events.trigger(eventName) method.
  • Explicit trigger: if you only want to trigger the associated campaign explicitely via our Activation API, and not via any other built-in conditions. This will usually be the case for campaigns implemented on your side with a modern JS framework (React, Vue, Angular…), or for hybrid experiments where the implementation is on the back-end and the tracking is on the front-end.
  • Browser: includes or excludes visitors based on their web browser. It’s possible to specify the browser version or to target versions that are strictly superior or inferior to another version.
  • Operating system: includes or excludes visitors based on their operating system (Windows, Mac OS, etc.).
  • Element on the page: includes or excludes visits based on the presence of an element on the page.

External tools

Kameleoon provides bridges with the main CDP (Segment, Tealium, CommandersAct, Piano…), DMP (Salesforce, Oracle…) and analytics platforms (Mixpanel, Heap, Google Analytics…) which allows to target segments or cohorts of visitors. See all our integrations

You can manage all the segments you have created on the Segments page. To learn more about segment management, read our article on this topic.

 

  • In this article :