Rich-text Reply

How to test new design (site-wide test)

migueltic 09-04-15

How to test new design (site-wide test)

Hi,

 

We've created a completely new design (with new contents also) and we want to test it vs. our original design (and original contents).

 

It will be a site-wide test, except for a couple of sections (like the blog, that stays the same)

 

What are the options to test this with Optimizely? What do you recommend?

 

Thanks!

MartijnSch 09-04-15
 

Re: How to test new design (site-wide test)

Hi,

How about changing the design based on a parameter in the URL? What you than could do is make sure that the variation is redirecting to the user with a parameter to make sure they'll get the new design. in that case you should be able to run the new design within Optimizely.
migueltic 09-09-15
 

Re: How to test new design (site-wide test)

Thanks MartijnSch! What you suggest seem pretty difficult to implement in our case, but maybe it's the only solution. Could you provide more info or some links that explain in more detail how to configure that in Optimizely?

 

Does anyone have other ideas??

MartijnSch 09-09-15
 

Re: How to test new design (site-wide test)

https://help.optimizely.com/hc/en-us/articles/200039685-Audiences-Choose-which-visitors-to-include should help you and especially the part around query parameters.

Re: How to test new design (site-wide test)

Hi @migueltic,

 

Can you confirm that you've already stood up this new site on your side (i.e. it already exists at some URL that is different from your current site)?  And if so, could you help us understand what our redirect test approach doesn't do for you?

Harrison Krat
Solutions Architect | Optimizely, Inc.
harrison@optimizely.com
 
migueltic 09-10-15
 

Re: How to test new design (site-wide test)

[ Edited ]

@Harrison_Krat. the redirect test works for site-wide tests?

I've just tried to configure that and I only see the option for a redirect for one page in particular, not site-wide. I don't see any "substring match" options or anything like that in the redirect configuration popup.

 

Re: How to test new design (site-wide test)

Hey Miguel,

You can use a special block of code to do parameter based or substring match redirect tests. See this here: http://developers.optimizely.com/javascript/code-samples/index.html#advanced-use-cases
-----

Daniel


Digital Marketing Manager - mindbodygreen
Optiverse User Group Leader - NYC
migueltic 09-10-15
 

Re: How to test new design (site-wide test)

@danielpeskin Unfortunately, I think that solution is out of my league, too complex. I'm not a programmer and I don't think I could develop the appropriate code.

 

It's quite surprising that Optimizely doesn't have a easy way to do site-wide tests like this.

For example, I've found solutions for Google Analytics Content Experiments and VWO to do this kind of tests (https://vwo.com/blog/a-dead-simple-trick-to-create-site-wide-ab-split-tests/)

Re: How to test new design (site-wide test)

Hi @migueltic,

 

I apologize it's taken us a bit to understand what you're trying to achieve.  Unfortunately that VWO link points to a 404 error page so I was not able to learn about their solution.

 

Optimizely does offer a way to do site-wide redirect tests.  You can set URL targeting to a substring match of your entire original site.  Let's say that's www.mywebsite.com.  Then, when you create a redirect test, you are actually generating some standard JavaScript redirect code.  You can see and edit this code at any time in the Visual Editor by clicking the small blue < edit code > button in the far lower right corner of the screen to open our Code Editor.

 

You'll see that at the start, you are absolutely right in that Optimizely executes the redirect to a single page.  We simply need to modify this code to be more generic.  Let's say this was your standard code:

/* _optimizely_redirect=http://www2.mywebsite.com */
var _optly={redir:document.createElement("a")};
_optly.redir.href="http://www2.mywebsite.com";
_optly.cur=window.location.search;
if (_optly.cur) {_optly.redir.search=_optly.redir.search ? _optly.cur + "&" + _optly.redir.search.slice(1) : _optly.cur;}
window.location.replace(_optly.redir.href);

This code assumes that you're original site is www.mywebsite.com, and you're trying to always redirect to the corresponding page on www2.mywebsite.com.  This code also preserves any query parameters after the redirect.  So really, we simply want to change www in any URL on your site to www2, and leave the rest of the URL as is.  Modify the code to look like this:

/* _optimizely_redirect=http://www2.mywebsite.com */
window.location=window.location.href.replace(/www/,'www2');

Click the green Apply button, and you're good to go.

 

Here's another way to do it.  Let's say that on your new www2 site, there are a couple of pages that don't exactly match their URLs from the old www site.  We need to selectively redirect to the correct www2 pages.  Here's how that code would look:

/* _optimizely_redirect=http://www2.mywebsite.com */
var redirect_portion = window.location.pathname;

if(redirect_portion.match("products")){
  redirect_portion = "/information/products";
} else if (redirect_portion.match("signup/page1")){
  redirect_portion = "/join_us/begin_page1";
} else {
	redirect_portion = redirect_portion;
}
var _optly={redir:document.createElement("a")};
_optly.redir.href="http://www2.mywebsite.com" + redirect_portion;
_optly.cur=window.location.search;
if (_optly.cur) {_optly.redir.search=_optly.redir.search ? _optly.cur + "&" + _optly.redir.search.slice(1) : _optly.cur;}
window.location.replace(_optly.redir.href);

You're keeping most of our boilerplate code in place, but you're parsing out the original URL's pathname (anything after http://www.mywebsite.com/).  If that value is one of a couple select pages, reassign the value to the new www2 page's pathname.  Otherwise keep what was there.  Then, concatenate the new hostname with the new redirect portion.

 

Hopefully one of these code approaches works for your scenario.  If you'd like any further assistance with setting this up, please do let me know.  Thanks!

Harrison Krat
Solutions Architect | Optimizely, Inc.
harrison@optimizely.com