The Techie Guide to Google Website Optimizer v 1.
The Techie Guide to Google Website Optimizer Contents Forward 3 Prerequisites 3 Future Compatibility 3 Updates and Revisions 3 How Experiments Work 4 A/B Experiments 6 Detailed Explanation of MVT Experiments The Conversion Page 6 8 Setting Up Experiments 9 Background 9 Standard Experiments 9 Non-Standard Experiments (Testing Static Content) 12 Background 12 But what if this isn’t the case? 12 Setting up Multivariate Tests 13 Experiments with Dynamic Content 18 Background 18 Option 1 - Use a
The Techie Guide to Google Website Optimizer Forward Welcome to The Techie Guide for Google Website Optimizer™ (GWO) This guide will help you integrate GWO into any website and test almost anything. You’ll find detailed technical information on what GWO does and how it works. We’ll cover integration issues (“Where exactly do I put the GWO code?”) and setup issues (“How do I create an experiment using a nonstandard setup?”). We’ll show you how to launch simple experiments and full-on hairy scenarios.
How Experiments Work This chapter will show you how experiments work, with notes on page loads, JavaScript, cookies, and more. We’ll describe what happens when a website visitor hits: • The test page for A/B • The test page for MVT • The conversion page Let’s start with a simplified overview of what Google Website Optimizer does. Suppose you have a website at http://www.mysite.com/landing_page.
The Techie Guide to Google Website Optimizer Depending on how you set up your experiment, each visitor could see one of a dozen or more combinations of the headline, image, and call-to-action button on that page. In other words, one would see the puppy image with headline A and call-to-action button B. Another would see the kitten image with headline C and call-to-action button A. And so on. Let’s take a closer look at an MVT experiment in action, continuing the three-section experiment we described above.
The Techie Guide to Google Website Optimizer A/B Experiments For A/B tests, the sequence is almost the same. But instead of GWO replacing pieces of the page content dynamically, it redirects the visitor to one of the prepared test pages. The Control Script for an A/B experiment is nearly identical to that of a multivariate experiment. It contains an extra script that when executed calls the utmx function.
The Techie Guide to Google Website Optimizer The virtual URL looks like this: “//test” where the experiment key is the same as the k variable in the Control Script like var k=’2045836535’. Know your cookies Here’s a detailed explanation of the parameters in the GWO cookie: v The version of the control code making the signup request to siteopt.js. The v value is hard coded in the Control Script on the test page. utmxkey The unique identifier for the experiment.
The Techie Guide to Google Website Optimizer 6. The visit tracking code runs, which tracks a visit and the page version. This is basically a standard Google Analytics (GA) tracking call, using a custom “virtual URL” representing a visit to the test page. 7. The virtual URL looks like this: //test where the experiment key is the same as the k variable in the Control Script like var k=’1234567890’.
Setting Up Experiments Background Now that we see how GWO actually works down in the boiler room, let’s set up an experiment. Section one, Standard Experiments, covers the simple scenario of a single test page and a single conversion page on a single server. In this scenario the content you want to test is static (though the page itself might be generated dynamically with PHP or ASP.NET).
The Techie Guide to Google Website Optimizer Step 2: Install and validate JavaScript tags On your test page: • Add the Control Script at the top of the page • Add Section Script tags for the sections you want to test (in this example, the headline and the submit button text) • Add the Tracking Script at the bottom of the page On your conversion page: • Add the Conversion Script At this point GWO will try to retrieve the pages from your website in order to: • Validate the Control Script on the test
The Techie Guide to Google Website Optimizer First variation test page: • Add the Tracking Script at the bottom of the page Second variation test page: • Add the Tracking Script at the bottom of the page Conversion page: • Add the Conversion Script At this point GWO will try to retrieve these pages in order to: • Validate the Control Script on the original test page • Validate the Tracking Script on the original and variation test pages • Validate the Conversion Script on the conversion page Ste
Non-Standard Experiments (Testing Static Content) Background Before we go into the specifics of setting up experiments for non-standard setups, let’s elaborate on some GWO concepts. Earlier in this guide, we used the terms test page and conversion page (in singular form) to keep things simple. As you set up an experiment, GWO asks for the URL for your test page (or pages, for A/B experiments) and the URL for your conversion page.
The Techie Guide to Google Website Optimizer Original versions of content When the original version of the content is displayed, GWO does NOT make any modification to the content in the section. The only place that the original content exists (for the purposes of displaying to end users) is in the page itself. If you make any changes to the original content on the page that’s what visitors will see when they are chosen to see the original.
The Techie Guide to Google Website Optimizer How Website Optimizer uses the Test page URL: • In Step 1, GWO will make a request to this URL to confirm that the page exists. If this URL isn’t live yet, check the box reading ‘The URL is correct’ to continue on to the next step. • In Step 2, GWO will try to load the page found at this URL, looking for the page sections to be tested.
The Techie Guide to Google Website Optimizer Step 2: Install and validate JavaScript tags In Step 2, GWO asks you to add the JavaScript code to the appropriate pages or sections of your site. The system will then: • Try to validate that you correctly copied the Control Script, Tracking Script and Conversion Scripts. • Look for parts of the page tagged with Section Script. Click Validate pages and GWO will try to download the files from the URLs provided.
The Techie Guide to Google Website Optimizer For the conversion page, locally create a dummy file (such as conversion_dummy_file.html) containing nothing but the Conversion Script. This is especially helpful if the conversion page requires a purchase and is hard to view without making an actual purchase. In any case, you’ll need to add the Conversion Script to the real conversion page before you launch the experiment.
The Techie Guide to Google Website Optimizer For example, if the page is: http://dev.mysite.com/product_page.php?pid=123 ...and the preview URL looks like this: http://de v.mysite.com/product_page.php?pid=123#utmxid=EAAAACmLHKpzyPXnHnp og9gHi14;utmxpreview=0-0-0;utmxreload=1 You can just switch the domain name to test it in production: http://ww w.mysite.com/product_page.
Experiments with Dynamic Content Background It’s a common question: “How do I deal with experiments where the section I want to test includes dynamic content?” Suppose you want to test three sections on a product detail page: • Product name (testing a short name vs. long name) • Product image (testing large vs. small) • Call-to-action button (testing “Add to Cart” vs. “Buy Now”) At first glance, this seems to be a prime candidate for a MVT experiment.
The Techie Guide to Google Website Optimizer Let’s dig into the details. Option 1 - Use a MVT experiment and custom JavaScript Here is a proof of concept example that uses an MVT style of experiment to test sections with dynamic content. Suppose you have a section in which there are three pieces of dynamic content. Then, consider an alternative section variation for this section: Point to remember There is no “best” solution for implementing experiments with dynamic content. Each has its pros and cons.
The Techie Guide to Google Website Optimizer Option 2 - Use an A/B experiment. As noted earlier, an A/B experiment can be implemented two ways: Option A: Create multiple physical copies of the dynamic page. Option B: Have a single physical page with multiple virtual versions. Let’s look at the implementation details of each option. Option A: Create multiple physical copies of the dynamic page. For example: • Original: product.php • Test Variation B: product_b.php • Test Variation C: product_c.
The Techie Guide to Google Website Optimizer 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.
The Techie Guide to Google Website Optimizer 3. The visitor will immediately be redirected to product.php?pid=123&variation=b 4. The page product.php?pid=123&variation=b loads 5. The GWO display code will NOT be included 6. dynamic_include_b.php will be included When setting up this experiment, you’d use these URLs: • • • Original: http://ww w.mysite.com/product.php Test Variation B: http://ww w.mysite.com/product.php?variation=b Test Variation C: http://ww w.mysite.com/product.
The Techie Guide to Google Website Optimizer Other Advanced Stuff Using Server Side Session Variables If you’re using a single physical page, and multiple virtual versions, you may also add back-end code that uses a server-side session variable to remember what variation to display for the user. Naturally, this requires some experience using session variables. The advantage to this is that visitors will be redirected only once per session -- the first time they visit the test page.
The Techie Guide to Google Website Optimizer Add JavaScript tags to experiment pages This is Step 2 of the Website Optimizer tool provides the specific code to install on your pages. For your original page: 1. Add both the Control Script and the Tracking script as described in the tagging instructions. 2.
The Techie Guide to Google Website Optimizer Review and launch 1. Double-check your experiment setup, and designate how much traffic to include in the experiment. 2. Click Launch now to launch the experiment. 3.
The Techie Guide to Google Website Optimizer Detailed Reporting: GWO Users Pitch In Google Website Optimizer focuses on visitors and conversions. But suppose you’d like to get even more detailed analytical information for each combination? Stats like time spent on each page, bounce rates, keyword segmentation, date breakdown, etc. Well, you can -- again, thanks to a clever trick by some of our GWO users.