Configure the target

You can configure an experiment that targets a particular segment of visitors to your site.

You can define which visitors are eligible for participation by clicking on the Target button in the experiment configuration header panel and then selecting your preferences from the target configuration panel.This panel displays the Experiment URL along with the configurable target definition fields, and the traffic allocation.

Note: Clicking outside the target configuration panel will close the panel without saving any changes you have made.

Configure the target definition

You can use the target definition section to refine which visitors should be included as participants in the experiment. The following options are available to configure the target definition:

  • Targeting Method: This allows you to decide whether to use layout targeting or URL targeting.
  • Layout Name: If you select layout from the Targeting Method box, this field displays the layout name used for layout targeting.
  • URL Targeting: If you select URL from the Targeting Method box, this area displays two further options that you can use to configure the target for the experiment:
    • Included URL: This is a text box where you can enter a string to use to perform a match against the visitor’s URL. Note Using commas within this string may affect how your exported data is displayed.
    • Match Type: This lets you decide what kind of match you wish to perform. If you select Regular Expression from the Match Type dropdown, then you can use the Included URL textbox to provide the RegEx query you wish to run.

      Note: When Regular Expression is used to match URLs, the regular expressions are evaluated on the server and so follow the Java Regular Expression syntax (which is slightly different from the JavaScript syntax). As we follow the Java syntax positive and negative lookahead work. When you save a Regular Expression in the editor, it is validated to ensure that the syntax is correct. It is worth noting that just because the syntax is correct, does not mean it will match the URLs you want. A basic example of Regular Expression for the cart/checkout pages is: .\.com\/(cart|checkout)(\/?.|?.) Any opening and closing ‘/’ will be included in the string being matched. The Regular Expression will match any or all of the URL, therefore, the example ‘\.com\/(cart|checkout)’ would match both https://www.anyexamplestore.com/cart and https://www.anyexamplestore.com/checkout.

By default, URL Targeting is defined as an exact match against the experiment URL. You can change this and the visitor is considered a participant in the experiment when their URL meets all the defined URL targeting matches.

You can add additional URL Targeting conditions by clicking on the green + icon below the existing conditions.

You can remove a URL Targeting condition by clicking on the red icon to the right of the condition you wish to remove.

You may have up to five URL Targeting conditions defined. If you have multiple URL Targeting conditions, the visitor’s URL must match all of the included URLs.

  • Audience: This allows you to limit an experiment to members of an audience group as defined in Commerce. You can select your desired audience from this dropdown to apply it to the experiment you are creating.

For more information on managing audiences within Commerce, see Define Audiences.

If you open the experiment configuration screen from Design or clicked on the New Experiment button in Experiments while a filter is in place, the Targeting Method is set to Layout by default with the relevant layout displayed in the Layout Name field.

If you open the experiment configuration screen by clicking on the New Experiment button in Experiments while no filter is in place, the Targeting Method is set to URL by default with the Experiment URL you provided in the Included URL field.

When you have finished configuring the target for the experiment you can save your changes by clicking on the Save button. If you click on the Cancel button, the target configuration panel retracts and changes are not saved.

Configure the traffic allocation

Traffic allocation is used to define how the participants in the experiment are split between the control path and the variant path. The default values for the traffic allocation depend on how many variants are defined for the experiment. You can change the traffic allocation by manually entering different values.