Rich-text Reply

Variation Code - Multi-Page UI

shannonriester 03-20-19

Variation Code - Multi-Page UI

It's too easy to overlook that there are multiple pages used in the variation code WYSIWYG view. Most of the developers on my team overlook that the variation-code has a dropdown for each of the targeted pages in the experiment. 


It would be nice to separate these into unique, easily recognizable tabs. This way, it would be easier to:

  1. See that code could be injected into the variation across multiple pages.
  2. Toggle between control and variation code across the same page. For example, if I need to update the control's javascript code on the homepage as well as the code in variation-1 on the homepage, I wouldn't have to select variation-1 then select the homepage Saved Page.
JasonDahlin 03-20-19

Re: Variation Code - Multi-Page UI

For this reason, I create Pages that cover every page type that we want to deploy to and if I need to run different code on different pages, I use jQuery selectors to determine which page I am on so that only the right code runs on each page.

e.g., I have "category", "pdp", and "category and pdp"
If a test is running on both category and pdp pages and the code for them is different, I do like

if (window.$('.category-view').length>0) {
  //do category stuff
} else {
  //do PDP stuff

Not saying a tweak in the design wouldn't make things easier, but a tweak in your setup may prevent the errors you are encountering.

--Jason Dahlin
Analytics and Testing Guru Smiley Happy

Experimentation Hero