Remember me? forgot password | register

SilverStripe Forum

769 Posts in 209 Topics by 223 members

Jump to:

Website Authors

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Website Authors » SilverStripe and Google Website Optimizer
Page: 1 go to end Reply
Author Topic: SilverStripe and Google Website Optimizer 595 views
  • KatB
    KatB's avatar
    Community Member
    88 posts

    SilverStripe and Google Website Optimizer Link to this post

    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?

  • Fuzz10
    avatar
    Community Member
    300 posts
    3 SilverStripe Sites

    Re: SilverStripe and Google Website Optimizer Link to this post

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

  • KatB
    KatB's avatar
    Community Member
    88 posts

    Re: SilverStripe and Google Website Optimizer Link to this post

    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?

  • lewiverdatama
    avatar
    Community Member
    1 post

    Re: SilverStripe and Google Website Optimizer Link to this post

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

  • Sam
    avatar
    Core Development Team
    477 posts

    Re: SilverStripe and Google Website Optimizer Link to this post

    Put ContentNegotiator::disable() in _config.php

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

    * Page.ss
    * Page_versionb.ss
    * Page_versionc.ss

    You can then access the different templates as:

    http://www.mysite.com/my-page/ --> Page.ss, this is what normal visitors see
    http://www.mysite.com/my-page/versionb --> Page_versionb.ss
    http://www.mysite.com/my-page/versionc --> Page_versionc.ss

    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().

    595 views
go to top Reply

Currently Online:

corkg, gkinane, PatDeLux, kickme

Welcome to our latest member: sagelike