Add an Optimize Test Page

A test page in Optimize maps to one or more URLs of an actual web page that you plan to test or target.

  1. From the navigation menu, click Library.
  2. Select the Pages tab and then click New Page.
  3. Enter a name and description.
  4. Select the type of address you want to use: Web Page Address (URL) or Regular Expression (Advanced)
    • Web Page Address (URL) Use this option to enter part or all of a web page address along with any query string parameters and values necessary to identify the page for testing. Examples:

        This will match only page.html on the domain in unsecured http:// protocol.


        This will match any page.html on any subdomain of in either http:// or https:// protocol.


        This will match only page.html on the domain in the secured https:// protocol with both query strings set to the defined values regardless of their order on the address.

    • Regular Expression (Advanced) Use this option for URLs that match a text string using regular expression syntax. Regular expressions must follow EMCA-262 (JavaScript) patterns. Example:
      • (www|staging).exampledomain\.com/page\.html($|\?.*)

        This string will match both and

  5. Enter at least one URLs or regular expression. To add more than one, click the plus sign (+) button. All addresses are evaluated as case insensitive by default. Click the case insensitive link above to toggle to case sensitive.

    Adding multiple URLs is useful when a web page is stored in more than one server location. For example, a page may be stored on a staging server that you use for testing ( and a "live" server that you use for production ( By adding a URL for each of these locations, the tests or targets for the page can be verified on the staging server initially, then made live without changing the page URL field in Optimize.

    Note: Do not enter addresses that include the number sign (#). When sending addresses to Optimize, Web browsers transmit only the portion of the address that appears before the number sign. The remaining text is ignored.
  6. (optional) For regular expressions, enter a URL in the Check a URL field to verify whether it matches the expression above. A green icon indicates that the URL is a match and will be included in any testing or targeting for this page. A red icon indicates that the URL will not be included.
  7. Click Next.
  8. Select the type of cookie you want to use: First-party only or First and Third-party. Use the third-party option to support cross-domain tracking.
  9. Indicate whether you want to use cookie inspection: Enable or Disable. When you enable cookie inspection, you can later use data from the cookie to build segments.
  10. Select any additional attributes you want to use for this page.
    Attribute Name Description and Default Value
    cookiePath Scopes cookie creation to a path on the web domain, indicating that the cookie should only be sent back to the server for the path you enter here. Default value is /. Format: path
    cookiePrefix Specifies the prefix to add to a cookie name. Default value is _wt. Format: string
    controlCookieTimeout Duration (in milliseconds) that tracking cookies will persist for a test. Default value is 7776000000 (90 days). Format: 1 - n
    splitMatchRegex Split tests only. Specifies a regular expression that is used to determine if the current page is equivalent to the split page to which a visitor should be directed. You use this attribute for a page URL that can be slightly different depending upon query string values. Thus, a splitMatchRegex value of '' would ensure that '' and '' are treated as the same page. Default value is null.
    testGroup Use to identify pages and associated tests as members of a logical "test group". When executed within a test group, conversion events can be applied to one or more tests within the group. Otherwise, conversion events will be applied only to the most recently visited page/test. The testGroup attribute must also be used on pages that serve as both the starting point for one test and the conversion point for another test. Default value is null.
    debug Opens the debug window. Select the level of verbosity that you want for messages by type the letter v. Use v for Info level, vv for Debug, and vvv for Trace level messaging.
    defaultUrl Use to redirect page visitors to another location when Optimize shows default content or when an error occurs. Value: URL, default value is null.
    Add custom attribute Enter the name and value of an attribute you want to add that is not listed here.
  11. Click Next.
  12. (optional) Click Add pre-processing script to add JavaScript code that you want to run before the page is fully rendered in a browser. The code you enter here runs before segmentation, content streaming, or split page redirection.
    1. Enter a Request Attribute Name. This is the variable name that receives the results of the script execution, usually a string, integer, or Boolean value, and can be used in segments.
    2. Enter the script that will run during pre-processing. Do not include <script> tags or other HTML markup.
    3. Click Save.
  13. Click Finish.