Configuring a server-side segment

3

min

quiz

A server-side segment is a specific segment for server-side experiments where only specific targeting conditions are available.

A server-side segment:

  • can only be created via the code editor;
  • can only contain the targeting conditions “Custom data” and “Page URL”.
  • can only be used in a 100% server-side experiment.

There are two ways to obtain a server-side segment:

  • either create a new server-side segment;
  • or transform a client-side (“classic”) segment into a server-side one.

These two actions are possible by clicking on the “Targeting” block in the “Finalize” part of the code editor.

Learn more about server-side experiments

Access the code editor

On the side menu of the back-office, click on “New project” (or “New test” on the A/B test Dashboard).

 

A pop-in is displayed on which you can choose between:

  • Classic A/B test;
  • Multivariate test (MVT);
  • Server-side A/B test;
  • Code-based A/B test.

Select “Server-side A/B test”.

 

Select the “100% server-side” type of experiment.

Enter the mandatory fields and click on “Create”.

The code editor launches in a new tab.

 

Create a new server-side segment

In the “Finalize” part of the configuration of your experiment via the code editor, click on “Targeting” to associate a segment to your experiment.

Then click on “Create a new segment” to open the segment builder popin.

Enter your segment’s name and description

The first fields to fill in are the website for which you create this segment and the name you want to give it. You can also add a description and/or 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.

Only two types of conditions are available for server-side segments:

  • Visited pages > “Page URL” (for Nginx or Apache);
  • “Custom data” (for Java or C# only).

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

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

Validate

Then validate the creation of your server-side segment. It is automatically associated with the experiment.

You can edit its configuration, but not modify its server-side type.

You will find it in the finalization panel, in the “Targeting” tab.

Learn more about targeting in server-side experiments

Transform a client-side segment into a server-side segment

In the “Finalize” part of the configuration of your experiment via the code editor, click on “Targeting” to associate a segment to your experiment.

Then select an existing segment in the dropdown.

The listed segments are:

  • classic segments that only use “Page URL” and “Custom data” targeting conditions;
  • server-side segments.

If the classic segment is not used on an active experiment (online, deviated, paused or planned), you can either duplicate or turn it into a server-side segment.

If the classic segment is used on at least one active experiment (online, deviated, paused or planned), you can only duplicate it.

Duplicate

If the classic segment is not used on an active experiment (online, deviated, paused or planned):

  • you can choose between duplicating the segment or transforming it;
  • simply click on the “Duplicate” button;
  • the classic segment is duplicated (this action keeps the classic segment and creates a server-side copy containing the same conditions and settings);
  • the newly duplicated segment is now associated with the 100% server-side experiment and can be used in server-side experiments only.

If the classic segment is currently used on at least one active experiment (online, deviated, paused or planned):

  • an alert pop-in indicates that the segment is in use and that to be able to modify its type you need to duplicate it;
  • while hovering the list icon on the bottom left, you can check all the active experiments on which this segment is used;
  • if you still want to change the type of the segment, click on the duplicate button;
  • the classic segment is duplicated (this action keeps the classic segment and creates a server-side copy containing the same conditions and settings);
  • the newly duplicated segment is now associated with the 100% server-side experiment and can be used in server-side experiments only.

The name of a duplicate segment automatically takes this format: segment-name-[COPY].

Transformate

If the client-side segment is not used on an active experiment (online, deviated, paused or planned):

  • an alert message asks you to confirm this transformation;
  • simply click on the “Transform” button to validate;
  • the classic segment is automatically turned into a server-side one, keeping the same conditions and settings (this action is irreversible);
  • the newly transformed segment is now associated with the 100% server-side experiment and can be used in server-side experiments only.

Validate

You can edit the configuration of the server-side segment, but not modify its type.

You will find it in the finalization panel, in the “Targeting” tab.

Learn more about targeting in server-side experiments

Manage server-side segments

On the Segments page, server-side segments are automatically flagged with the “SERVER-SIDE” tag.

This tag cannot be removed, modified or manually added to a segment.

You can filter the Segments page using this tag: only the server-side segments will be displayed.