Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

SilverStripe and Google Website Optimizer

Go to End

5 Posts   2764 Views


Community Member, 105 Posts

29 April 2008 at 7:10pm

Google Website Optimizer wants you to create different versions of the same page you want to test. Doing this in plain vanilla HTML would be straight up and down.

However, at first glance, Silverstripe would include every single variant within the hierarchy and place them in the navigation system.

Is there an easy way to create variants without having them show up on the site?


Community Member, 791 Posts

29 April 2008 at 7:28pm

Sure.. Just de-select "show in menu" and/or "show in search" in the behaviour tab.


Community Member, 105 Posts

30 April 2008 at 8:20pm

I have actually created a static page that I wanted to use as my variant and all goes well until *ka boom* I put in Google's crappy javascript code.

In order to get Google's Website Optimizer to work I will need to remove the content negotiation (they insist on having unescaped <s in their script code within the body element)

How can I change the MIME type settings of Silverstripe back to text/html?


Community Member, 1 Post

5 May 2008 at 11:10am

i'm new here, hope you all help me if i meet any problems.


Administrator, 690 Posts

8 May 2008 at 11:31am

Put ContentNegotiator::disable() in _config.php

To address the issue of adding variant pages to SilverStripe, you could do it by creating additional templates:


You can then access the different templates as: -->, this is what normal visitors see --> -->

If you wanted to randomly send people to versionb and versionc, you could probably set up some kind of random redirector in Page_Controller::init().