Set up a page

  • Updated
  • Optimizely Web Experimentation
  • Optimizely Personalization
  • Optimizely Performance Edge

Pages are URL patterns that tell Optimizely where to run campaigns and experiments on your site. Use them as templates or for a single experiment or campaign.

Optimizely Performance Edge is a lightweight experimentation product that delivers faster performance than previous versions of Optimizely by using a streamlined microsnippet that limits the range of available features.

Set up a new page

  1. Go to Implementation > Pages.

  2. Click Create New Page.

  3. Enter a Name for your page. 

  4. In the Editor URL field, enter the URL you want to display in the visual editor when you edit your variations.

  5. Under Page Settings, select when the page targeting conditions are evaluated by Optimizely from the Triggers drop-down list. See Activation modes for details. What activation modes are available to you depends on whether you have support for dynamic websites enabled. 

    • Specify whether any or all conditions need to be valid for the page to activate.
  6. Enter all URLs to choose where your experiment runs

  7. From the Add Condition drop-down list, you can select additional conditions for your page:
    • Match URL – Match the visitor's URL.
    • Element is present – Enter a selector or selectors to activate a page only if a certain element is present on the page.

    • JavaScript Condition – Enter a function to call after the page triggers. The function must return true when the page is ready to activate.

  8. Under Advanced, you can select the checkbox to automatically deactivate the page when the trigger calls and the conditions are false. You can also select the checkbox to undo the changes after the page is deactivated. See Deactivate a page.

  9. Under Test URL(s), you can check sample URLs to see if they match the expected URL patterns. See Match validator.

  10. Click Create Page

Trim unused pages from the Optimizely Web Experimentation snippet

Trimming unused pages is only available for Optimizely Web Experimentation.

Snippet size can impact page performance, so you can choose to exclude unused pages from the snippet. This is called Automatic Page Trimming. Enable this to exclude all pages that are not involved in targeting or metrics—for example, pageview and click events linked to the particular page—for at least one running experiment.

To enable automatic page trimming:

  1. Go to Settings Implementation.

  2. Click more (...) for the appropriate snippet. If your account uses custom snippets, you can see more than one snippet listed. Choose the one that is relevant to this part of your experimentation program.

  3. Scroll down to the Snippet settings.

  4. Select Trim Unused Pages.

Screen Shot 2018-10-17 at 11.20.14 AM.png

You can also enable automatic page trimming for an experiment but still include specific pages that are not involved in targeting or metrics. For example, you can choose to include pages that are used for behavioral targeting audiences. Check with your team to see if there are any pages that the snippet must include. 

To override automatic page trimming for a specific page:

  1. Go to Implementation > Pages.

  2. Click more (...) for the appropriate page.

  3. Select Settings from the drop-down list.

  4. Select Override Page Trimming.

Screen Shot 2018-10-17 at 11.47.11 AM.png

Best practices for pages

  • Choose a descriptive name for your pages, like Home or Product Pages. This clarifies the purpose of the page, and you can add them to other experiments in the future without having to look at its targeting.

  • If the page you want to target is part of a funnel that has no unique URL and is session-based, set the Editor URL to the nearest URL possible. To open it in the visual editor, go to that stage of the funnel in a separate tab before reloading it in the editor.

Some of the triggers—specifically, When the DOM changes and When the URL changes—are only available after you enable Support for dynamic websites in your project.

You can add the page you create to any experiment or personalization campaign.