Target a webpage in a web experiment

Abstract

Details how to select the webpage as well as the conditions under which the experiment runs on your organization's website.

You can target a webpage as well as the conditions under which a web experiment runs on your organization's website.

To target a webpage in a web experiment:

  1. From the Build screen, on the Page Targeting tile, click Add.

    The Targeting sliding modal displays.

  2. In the Match on drop-down list, click one of the following operators:

    Operator

    Description

    Equals

    This operator executes the experiment if the guest's URL is an exact match to the string you specify in the adjacent URL field.

    Contains

    This operator executes the experiment if the guest's URL contains the characters you specify in the adjacent URL field.

    Starts with

    This operator executes the experiment if the guest's URL starts with the string you specify in the adjacent URL field. We often recommend using this operator, because many URLs are appended with query parameters such as utm_source=email_campaign

    Ends with

    This operator executes the experiment if the guest's URL ends with the string you specify in the adjacent URL field.

    Matches Regex

    Select this operator if you want the experiment to execute if the Uniform Resource Identifier (URI) of the guest's current page is formatted and matches the exact case in the specified Regular Expression (RegEx) pattern. This is useful if you want to use more than one contains conditions because you can match different data with just one Regular Expression. Enter the RegEx characters in the adjacent field. For more details on how to write RegEx characters, see the https://www.regular-expressions.info site.

    Tip

    This operator is case sensitive. If you want to use RegEx and disregard the case, select the Matches Regex (Ignore Case) operator.

    Matches Regex (Ignore Case)

    This operator executes the experiment if the Uniform Resource Identifier (URI) of the guest's current page is formatted in the specified Regular Expression (RegEx) pattern. This is useful if you want to use more than one contains conditions because you can match different data with just one Regular Expression. Enter the RegEx characters in the adjacent field. For more details on how to write RegEx characters, see the https://www.regular-expressions.info site.

    Does not equal

    This operator executes the experiment if the guest's URL does not match the URL you specify in the adjacent URL field.

    Does not contain

    This operator executes the experiment if the URL does not contain the characters specified in the adjacent URL field.

  3. In the String field, enter the string or characters required.

  4. To add additional target conditions, click Add page.

  5. To have Client-Side JavaScript (CSJS) executed on the browser to determine whether to execute the experiment, click Add JavaScript targeting.

    The Advanced Targeting dialog box displays.

  6. Enter the Client-Side JavaScript (CSJS).

    This can include truthy values. A truthy value is a value that translates to true when evaluated in a Boolean context.

  7. Click Done.

    You return to the Targeting sliding modal.

  8. Click Save.

    You return to the Build screen.