beautypg.com

Google Website Optimizer v 1.0 The Techie Guide User Manual

Page 21

background image

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 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_

_stuff after the section we want to test_

Modified version of product.php:

_stuff before the section we want to test_

_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 reaches 

product.php?pid=123

2. The GWO display code will be included and then executed (but not do anything)
3. dynamic_include_a.php will be included.

Scenario two: GWO chooses variation B of the page.

1. The user reaches 

product.php?pid=123

2. The GWO display code will be included and then executed, causing a redirect