21
The Techie Guide to Google Website Optimizer
Experiments with Dynamic Content
This method has an additional advantage: Since the file 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.
Let’s say the page we want to test isproduct.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_
<include le=dynamic_include_a.php>
_stuff after the section we want to test_
Modified version of product.php:
<if (variation is not dened in URL)
<include gwo_display_control_code.js>
</if>
_stuff before the section we want to test_
<if (variation is not dened in URL)>
<include le=dynamic_include.php>
<else>
<include le=dynamic_include_($variation).php>
</if>
_stuff after the section we want to test_
Here’s 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
Commentaires sur ces manuels