Rich-text Reply

Split Testing A CSS Stylesheet

hammersm 02-17-15

Split Testing A CSS Stylesheet



I want to do a site wide test which I know how to do with the url targeting.  But I want to split test a completely different style sheet on oage load and then use that stylesheet for the duration of the users visit.



Level 2

Joel_Balmer 02-18-15

Re: Split Testing A CSS Stylesheet

Hi there! You can achieve what you want by different methods.


You can perform a standard redirect to a new page that uses the new stylesheet, and then the user from there could navigate around the site using your new site that includes the new stylesheet. You perform a redirect in this way, here.


However, it should be possible to swap the current stylesheet out with jQuery in our code editor, with something similar to:



For reference, I used this source, here.


And from here you can target the experiment to run on substring match for your domain, from 'Options > URL targeting'


I hope that helps!

Re: Split Testing A CSS Stylesheet

[ Edited ]

Thank you for the quick response. It's the nav that I'm testing and the test should run across all of our pages. Which of the two methods you described would you recommend? I'm guessing the second one would work better.