Set up a Page in Optimizely Web Experimentation and Optimizely Performance Edge

  • Updated
This topic describes how to set up a new Page in Optimizely Web Experimentation and Optimizely Performance Edge. Pages are where experiments and campaigns will run on your site.

Optimizely Performance Edge is a lightweight experimentation product that delivers significantly faster performance than previous versions of Optimizely. It does this by relying on a streamlined "microsnippet" which limits the range of available features.

Optimizely Performance Edge and Optimizely Web Experimentation handle the creation of Pages the same way, so information on how to do so in this article applies to experiments created with either version of Optimizely.

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

Set up a new Page

The following images shows how to create and set up a new Page, with step-by-step instructions below:


  1. Go to Implementation > Pages.

  2. Select New Page.

  3. Name your Page. 

  4. In the Editor URL field, type the URL you want to be displayed in the Visual Editor while you are editing your variation.

  5. Choose the trigger type (this controls when the Page targeting conditions should be evaluated by Optimizely), and specify if any or all conditions need to be valid for a Page to activate.

  6. Enter your Page targeting conditions:

    • URL match. Specify URL targeting for your Page.

    • Element is present. Enter a selector/selectors to activate a page only if a certain element is present on the page.

    • JavaScript Condition. Enter a function that is called after the page is triggered. It should return true when the page is ready to activate.

  7. Click Save Page

Under the Advanced tab, you can select the option to automatically de-activate the page when the trigger is called and the conditions are not valid anymore, and potentially also undo the variation changes in that case.

Under the Test URL(s) tab, you can check sample URLs to make sure they match the URL patterns you specified in step 6.

Trim unused Pages from the Optimizely Web Experimentation snippet

Trimming unused Pages is only available for Optimizely Web Experimentation.

Because snippet size may impact page performance, users may choose to exclude unused pages from the snippet. This is called Automatic Page Trimming. When enabled, it excluded all pages that are not involved in targeting or metrics (both pageview & click events linked to the particular page) for at least one running experiment.

To enable automatic page trimming, follow these steps:

  1. Go to Settings > Implementation.

  2. Click the action-button.png icon for the appropriate snippet. If your account uses custom snippets, you might see more than one snippet listed. Choose the one that's relevant to this part of your experimentation program.

  3. Scroll down to the Snippet settings.

  4. Enable 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 may choose to include pages that are used for behavioral targeting audiences. Be sure to check with your team to see if there are any pages you should force the snippet to include. 

To override automatic page trimming for a specific page, follow these steps:

  1. Go to Implementation > Pages.

  2. Click the action-button.png icon for the appropriate page.

  3. Select Settings from the drop-down menu.

  4. Enable Override Page Trimming.

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

Best practices for Pages

  • Pick a descriptive name for your pages, like Home or Product Pages. This clarifies the purpose of the Page and you can add 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 be the nearest URL possible. To open it in the Editor, navigate 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.

Congratulations! You created a page you can add to any experiment or personalization campaign.