Run an Experiment on a Set of Similar Pages

Understand Similar Page Experiments

Let's consider we want to run an experiment on all the product pages in our online shop. The experiment will consist in changing the Add to Cart button. 

For this, we will start the experiment on one of the product pages and create the variation there (new add to cart button).  The variation needs to be created in such a way so that it will work on all the other product pages. If Visual Editor is being used to change the background image of the add to cart button , then we need to ensure generated code is universal enough to work on all product pages. 

Variation code can be checked looking at Variation Code under the variation menu:

Clicking on that the below screen appears:

As it can be seen, a Javascript code is being generated changing the gradient color of an element.

It's important to check the generated jQuery selector (pointed with the red arrow in the above picture) to make sure it's general enough to work on all product pages. In our case here, the selector is input#submit which is probably very good since it's referencing an element through its attached ID.

So, if on all the other pages the button we are willing to change  has ID submit the change will be successfully applied. if the selector would be something like DIV >DIV > DIV#product1234 > input then there could be problems finding the element on the other product pages since it looks tied to a specific DIV with ID product1234 (perhaps 1234 is the database product ID and therefore this selector will work only on that product page). 

This matter becomes technical fast enough so, depending on the site structure, it might be useful to have a developer helping out. Even if Visual Editor is used, when testing on dynamic multiple pages at once it's a must checking the generated code. Alternatively, manual code and CSS writing can be used to realize more advanced changes.

Also, when testing on dynamic pages (like product pages) and intend to run the test created on one page across multiple pages, make sure you do not hard code product specific content into the variation. Using any of Edit > WYSIWYG Editor or Edit > HTML will hard code the edited content causing the same content appear on all product pages.

The next step after the variation is created according to the guidelines above, we need to specify on which pages we want the experiment to fire. This is controlled in the experiment through the Site Area.

In there, we can match using URL (just URL, full URL with query, just query strings) if the site URL structure allows it. For example, if all the product pages have a URL that contains /p/ we can use that inside Site Area. If the URL structure does not allow to identify all the product pages (via simple match or advanced regex match) than the only option is using custom page tags.

After variation and Site Area were both setup, there's one more very important step: live preview of the variation on as many product pages as possible.

Have more questions? Submit a request

Comments