Skip to main content

Everything you need to switch from Optimizely Classic to X in one place: See the Optimizely X Web Transition Guide.

Optimizely Knowledge Base

Edit elements that appear site-wide

relevant products:
  • Optimizely X Web Experimentation
  • Optimizely X Web Personalization

This article will help you:
  • Run experiments that change the same element across multiple pages

You can use pages to test variations on a single element that's on every page of your site or on multiple pages, like a navigation bar or a footer. Visitors navigating across your site will continue to see the same variation of the element.

This article walks you through how to change elements that appear on multiple pages of your site.

Before you start, make sure the element has a unique ID in your code. This ensures that the correct element is modified, regardless of the page layout.


  1. Create an experiment on one page that contains the element you want to change. You'll use this page as a template, so you don't need to load the other pages that contain the element.

  2. Use the Visual Editor to make changes to the element.


  3. Set up a page where you will use URL targeting to target the element side-wide.

    Under URL Targeting, type a name for the page. In the Page Type dropdown menu, choose A set of URLs. Set the rest of the options according to the match type you want to use--the substring match usually works well.


  4. Confirm that the Optimizely snippet is on all the pages you list. Otherwise, the experiment won't run.

  5. Click Creat​​​​​​​e Page.

That's it! You've edited a site-wide element and ensured that visitors will see it consistently.


Adding multiple pages to an experiment won't affect your unique visitor count because Optimizely measures unique visitors, not page views.