The ROI Revolution Blog
« DEADLINE APPROACHING: Register for the FIRST EVER Google Website Optimizer Seminar for Success | Main | LAST CHANCE: To Attend the Washington, DC Google Website Optimizer Seminar For Success! »
Website Optimizer Wednesdays - Google Website Optimizer and Google Analytics Renew Their Vows
November 19, 2008
More than a year and a half ago, my co-worker Shawn Purtell and I were on a red-eye flight to Raleigh. We had just spent two days at the Googleplex immersed Google Analytics and Google Website Optimizer and our minds were reeling. While I tried unsuccessfully to get some much-needed sleep, Shawn kept going on about combining the multivariate experiment data from Google Website Optimizer with the more detailed metrics in Google Analytics.
I'm pretty sure that I slept most of the weekend (I don't take jet lag very well), but Shawn went straight to work on figuring out the GWO JavaScript and getting to the bottom of the combination algorithm. He returned to the office on Monday with the whole thing pretty much figured out. After a few days of testing, Shawn shared his method for inserting Google Website Optimizer combination data into Google Analytics reports:
Google Website Optimizer uses a single metric, conversion rate, to determine which combination of variations is king. But what about other metrics that may be just as valuable, like Page Value, Avg. Time, Conversion Rates for multiple goals, Bounce Rate, Exit %, and Full Navigation Analysis? What if you want to segment your traffic or filter out internal hits? Well, now you can find out just about everything you want to know about combinations by using Google Analytics.
He raises a great point. Google Website Optimizer is all about conversion rate, but in many cases, that's not the best metric for the job. Since posting his script back in April of 2007, we've had thousands of downloads. It's clear that others agree with Shawn. So does Google, it appears, because they've just made it a lot easier to integrate Google Website Optimizer and Google Analytics.
Read on for more about official updates to the marriage between Google Analytics and Google Website Optimizer.

Michael (vocals) and Shawn (drums) playing Rock Band with the Google Website Optimizer engineers. Photo by Scott Crosby.
We've just returned from our annual trip to Mountain View for the Google Analytics/Google Website Optimizer Authorized Consultants summit. We had a lot of fun (check out the pictures; click on them for larger versions) and learned a lot. The high point, though, was hearing about the new code additions to the siteopt.js script that powers Google Website Optimizer. Chief among these is an official update that makes Shawn's GWO/GA integration easier than ever.
The first two steps from Shawn's method have been consolidated. Just use this piece of code in place of your standard Google Analytics Tracking Code on any multivariate test page:

From left to right: Timothy Seward, Shawn Purtell, Michael Harrison, and Jeremy Aube. Photo by Tim Ash.
This will allow Google Analytics to report on the page and the page's combination. You'll access the data in the same way as before (see instructions) but now you can start collecting the data with less code and fewer steps.
There are several other updates for siteopt.js, which we'll cover in more detail next week. But we here at ROI Revolution are particularly proud that Shawn's GWO/GA integration concept has been forever immortalized in Google code. Congratulations, Shawn!
To learn more useful testing tips sign up for our Google Website Optimizer Training Series starting January 8th. This three session online class (with live Q&A) will encompass landing page principles, an intro to testing and advanced testing. Join us for the GWO Training Series!
Want more of Website Optimizer Wednesdays? Check out the rest of the series!
Exclude Internal Traffic from GWO | Optimize Your Call to Action | Landing Page Relevance | Choosing the Right Test Page | GWO and GA Renew Their Vows
Posted by Michael Harrison, Analytics and Optimization Specialist at 6:00 PM
Permalink | Comments ( 28 ) | TrackBacks ( 0 )
Filed under: Fun , Google Website Optimizer
TrackBack
TrackBack URL for this entry:
/mt/mt-tb.cgi/334.
Comments
You guys are great. Thanks for your contribution with GWO.
Posted by: RonPatiro at November 19, 2008 10:15 PM
Fantastic, congrats! i've recently implemented Shawn's technique for a trial run, and it's great to hear Google are integrating it to some extent themselves, even if it is unofficial.
I can appreciate the simplicity of GWO, and I understand GWO and GA are separate products, but when you've got an industrial strength analytics platform under the same roof it really doesn't make much sense *not* to use it for data collection (as you guys realised 18+ months ago), so it's very encouraging to see Google taking on board your excellent technique.
Look forward to hearing about the other updates, and here's to further GWO/GA integration in the future! :)
Posted by: Luke Stevens at November 20, 2008 6:37 AM
Hi guys, already got some news about a Flash GA tracking script?
Posted by: André Scholten at November 20, 2008 5:45 PM
This is great, I would love to see more GWO data and GA data combined.
Both are very powerful ways to analyse your website and make improvements to its design and structure.
Posted by: Gavin Doolan at November 24, 2008 5:03 AM
I am interested in learning more about how to work with the javascript for GA and optimizer. I don't know much of anything about code and programming, but I work with Google products everyday. If I ONLY want to learn about the javascript for Google Analytics and Optimizer, could I just study javascript and skip the other programming languages etc. I basically want to develop the understanding to implement hacks like that detailed in this great article. Thats really all I want to learn about javascript for. Thank you.
Posted by: karl at November 25, 2008 1:25 PM
Great, excited to try this. Does the code on this page actually replace the Google tracking script? Or is this in addition to it? Thanks!
Posted by: Rachel at November 26, 2008 8:44 AM
Thanks for the update! We started using this right away and it's been really helpful.
If you run two GWO tests simultaneously, how does this report in the Content>Top Content section?
Posted by: rachel at December 8, 2008 2:29 PM
@karl: While learning other programming languages will help with general concepts, learning JavaScript by itself will probably set you on the right track. Good luck!
Posted by: Michael Harrison, Google Analytics Support Tech
at
December 17, 2008 3:09 PM
@rachel: As long as you're not running the two tests on the same page, nothing will change. You'll see the same data in your content reports.
Posted by: Michael Harrison, Google Analytics Support Tech
at
December 17, 2008 3:31 PM
@rachel: It replaces the code.
Posted by: Michael Harrison, Google Analytics Support Tech
at
December 17, 2008 3:48 PM
Great, excited to try this. Does the code on this page actually replace the Google tracking script? Or is this in addition to it? Thanks!
Posted by: chattanooga at January 1, 2009 10:18 PM
Google have created such a great, free, set of tools for webmasters and marketers including Google Analytics and Website Optimizer. I think these powerful tools are often taken for granted, thanks Google :)
Posted by: Site Metrics Analytics at January 6, 2009 1:33 AM
So are you know able to integrate GWO and GA with more than one experiment running at the same time?
Thanks again for the post.
- Michael
Posted by: Michael Altman at January 12, 2009 3:50 PM
@chattanooga: Yes. Just use the new piece of code in place of your standard Google Analytics Tracking Code on any multivariate test page.
Posted by: Michael Harrison, Google Analytics Support Tech
at
January 29, 2009 1:41 PM
@Michael: Sure. Assuming that the experiments are running on different pages, that should be possible.
Posted by: Michael Harrison, Google Analytics Support Tech
at
January 29, 2009 1:54 PM
Very nice post.
Would creating the new object for pagetracker for this code be more advisable than replacing the existing GA code.
Posted by: osris at March 21, 2009 6:25 PM
@osris: That's up to you. Just make sure that if you want an accurate pageview count, you exclude one or the other from your reports. Otherwise, that single pageview will actually count as two.
Posted by: Michael Harrison, Google Analytics Support Tech
at
March 25, 2009 3:22 PM
We used this hack to optimize a secondary site goal (email sign-up) while preserving the ability to look at e commerce conversion in an ad hoc fashion. I wonder how many people ship an improvement to one process at the detriment of a more important site goal.
Thankfully with this script and a little foresight, you don't have to!
Posted by: Beck Kloss at April 1, 2009 8:45 PM
Thanks Micheal.
If I have different object names what is the reason for single page to count as two?
It would be great if you can you shed some light on the way pagetracker object works in website optimizer.
Posted by: osris at April 3, 2009 8:41 PM
Everything is happening on page as described on this blog, somehow Index values in top content report show 0.00$ for all combination's only.
Posted by: osris at April 6, 2009 11:14 PM
Replacing the GA code with the above code is not letting me track e-commerce revenue hence no index value. Any suggestions?
Posted by: osris at April 10, 2009 8:19 AM
@osris: The pagetracker object works the same way in website optimizer as it does for GA. Even if you have different object names, if their account IDs are the same, you will be registering two pageviews to the GA account.
As far as your issues with ecommerce, I don't know why this would be happening. Is the customized GA code on your receipt page, too? It really only needs to be on the experiment page.
Posted by: Michael Harrison, Google Analytics Support Tech
at
April 10, 2009 9:36 AM
Hello,
This is such a wonderful information and helped me a lot to know something new. But here i am searching for the details which allow me to track data of different design on same domain.
Let me explain, My website having two different design (i am testing for visitors like dislike) now how can i track which design is accessed how many times.
I am planning to create two different analytics account for the same, but i think there might be some other way to track this.
help will be appreciated.
thanks
Posted by: Josh at April 24, 2009 3:36 AM
Do you need to update the var pageTracker = _gat._getTracker("UA-XXXXXX-Y")
Part of the code with your GA or GWO account number?
Any help you can give is greatly appreciated :)
Posted by: Adam Boulton at May 12, 2009 11:59 AM
@Adam: Just replace it with your Google Analytics account number.
Posted by: Michael Harrison, Google Analytics Support Tech
at
May 12, 2009 3:24 PM
Thank you for the help, I thought it needed to be added but thought I check.
I have another question (sorry!) if I wanted to track across multiple domains how would I customize the analytics code? Could I just add the bits in bold on this post on to your tracking code?
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55503
Posted by: Adam Boulton at May 13, 2009 7:26 AM
@Adam: You've got it, Adam. Just add those lines. Be sure to use the proper linking functions to bridge the domains together and you should be fine.
Posted by: Michael Harrison, Google Analytics Support Tech
at
May 14, 2009 6:43 PM
Thanks guys, I finally understand what this code does and how it can be of benefit to GWO users.
$index value is the important feature here, because conversion rates don't always equate to more profit, so you may discover a combination that's better for revenue this way.
Thanks.
Receive new blog posts immediately direct to your email inbox!










