User guide

21
The Techie Guide to Google Website Optimizer
Experiments with Dynamic Content
This method has an additional advantage: Since thele name is the same for all variations, only the
parameters change, when the experiment is over and you’ve removed any GWO specific server side code,
your users will never get a 404 (looking for a page that no longer exists). Just make sure the page won’t crash
on unrecognized parameters.
Lets say the page we want to test isproduct.php
You’ll create a dynamically-included section for each version of the page you want to test. For example:
Original: dynamic_include_a.php
Test Variation B:dynamic_include_b.php
Test Variation C: dynamic_include_c.php
The original version uses a URL something like this: http://ww w.mysite.com/product.php?pid=87
...and the virtual version will use a URL something like this:
http://ww w.mysite.com/product.php?pid=87&variation=b
Here is an outline and some pseudo-code for the original and modified versions of product.php:
Original version of product.php:
_stuff before the section we want to test_
<includele=dynamic_include_a.php>
_stuff after the section we want to test_
Modified version of product.php:
<if (variation is not dened in URL)
<include gwo_display_control_code.js>
</if>
_stuff before the section we want to test_
<if (variation is not dened in URL)>
<includele=dynamic_include.php>
<else>
<includele=dynamic_include_($variation).php>
</if>
_stuff after the section we want to test_
Heres what will happen:
Scenario one: GWO chooses the original version of the page.
1. The user reachesproduct.php?pid=123
2. The GWO display code will be included and then executed (but not do anything)
3. dynamic_include_a.phpwill be included.
Scenario two: GWO chooses variation B of the page.
1. The user reachesproduct.php?pid=123
2. The GWO display code will be included and then executed,causing a redirect