Configuring a segment

3

min

quiz

Segmentation helps you precisely target your visitors. You can create, modify and duplicate segments with Segment Builder, a tool in Kameleoon’s back office.

Access Segment Builder

From your preferences

To access the Segment Builder from the back office, use the left side menu to go to the Segments page.

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

From the personalization creation page

You can also access Segment Builder while creating or editing a personalization, by clicking “Add New Segment” in the “Segment exposed to personalization” section.

The segment creation pop-in opens.

Create a new segment

Types of targeting

Kameleoon offers a priori segmentation, ahead of your A/B test launch. There are two options, it is 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 varaiation’s performance increased with a given segment. Kameleoon doesn’t manage this kind of segmentation, usually made by your web analytics solution.
  • A priori targeting is different. The A/B test 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 A/B test only for users in France. Similarly, you could test an offer with an A/B test only displayed to a specific segment (for example first-time visitors of your website). This kind of targeting is managed by Kameleoon.

A/B tests 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 create this segment and the name you want to give it. You can also add a description and tags.

The description is not mandatory but 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-side list to the right field.

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

Set the condition that you added as you want. 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 below the weight icon.

Fine-tune or add a new condition

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

  • Fine-tune 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

To understand these two ways of adding a condition, let’s take the following example:

Three conditions are selected: two of them are grouped (the first condition has been fine-tuned), the other is separated (the condition has been added).

They could be summarized as follows: (Condition A and Condition B) or Condition C

The tootlip next to “Definition” helps you understand the organization of conditions.

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

Targeting conditions

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

Visited pages

  • Page URL: includes or excludes pages based on their URL or URL fragment.
  • 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 URLs thanks to regular expressions. For examples of regular expressions, please read our article.

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 that looked for a specific keyword in a search engine such as Google, or to users that 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 condtion 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 referral URL.
  • Traffic type: includes or excludes visitors from a type of site (search engine, emailing, site tributary, etc.).

Visitor characteristics

  • New or old visitors: includes only new visitors (first visit) or those returning to your site.
  • Browser language: includes or excludes visitors according to the language set in their web browser.
  • 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.
  • Screen resolution: includes or excludes visitors by the size of their screen (in pixels).
  • Visitor IP address: includes or excludes visitors based on their IP address.
  • Exclusive test: includes only visitors who are not participating in any other running tests.

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. Kameleoon also offers visitor targeting according to geolocation data: country, region or town.

Visiting behavior

  • Number of page views: includes or excludes visitors according to the number of pages visited previously.
  • Elapsed time: includes or excludes visitors based on the time elapsed since the page was loaded.
  • Mouse exit: includes visitors whose cursor has left the browser window.
  • Product pages: Only available in the Personalization module. Includes or excludes visitors based on previously visited product pages. More information

External environment

  • Date Range: includes or excludes visitors to the site during a given time period (in days).
  • Time range: includes or excludes visitors to the site 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. You can create your custom data in your preferences. For more information, see the article on advanced targeting tools.

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 experience. This function is evaluated each time the page is displayed. When you return undefined, your code will in that case be executed again (every 75 ms for the first 3 seconds after the first invocation, then every 250 ms). If you want to return true ou false depending on the value of a variable in your datalayer you can use that code (which you need to adapt depending on your datalayer 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
  • 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.
  • Browser: includes or excludes visitors based on their web browser. It is possible to specify the browser version or to target versions strictly superior or inferior to another version.
  • Operating system: includes or excludes visitors based on their operating system (Windows, Mac OS, etc.).
  • Presence of an element on the page: includes or excludes visits based on the presence of an element on the page.

External tools

  • Ysance
  • Tealium Audiencestream

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.