*Update May 12, 2008: This article is OUT OF DATE! The good news is that there is a brand-spanking-new version that is much easier to use! Click here to check out the new version!
Alright everyone, you may want to grab a drink and a comfy seat before we begin – this article’s a whopper. So you may have heard about Google’s new Website Optimizer tool that is available through Google AdWords. 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! We’re still just starting to understand how powerful this method is, but I can say that I’m extremely excited about it (hopefully not just because I developed it).
So kick back and read on to find out how…
It may not sound like it, but integrating this tool can be easy as pie. You need to do three things:
1. Put two JavaScript functions on the test page.
2. Change the Google Analytics tracking script to use the new functions.
3. Filter out the combination data from main profiles within Google Analytics.
Here are the steps in detail, along with the results that show up in Google Analytics:
1. Put two JavaScript functions on the test page (The integration tool)
You can find this function by visiting this link. The file is called gwo_analytics_integration.js. The easiest way to use it is as an include on your test page. In order to do this, you must upload the file to your own server.
The include looks like this:
<script language=”JavaScript” src=”gwo_analytics_integration.js” type=”text/javascript”></script>
Make sure you include it before the Google Analytics tracking code and after the Google Website Optimizer test page control script (thanks to Ophir for pointing out that I forgot to mention that it needs to go after the control script).
2. Change the Google Analytics Tracking code on your test page
from:
<script src=”http://www.google-analytics.com
/urchin.js”type=”text/javascript”>
</script>
<script type=”text/javascript”>
_uacct = ‘UA-XXXXXX-X’;
urchinTracker();
</script>
to:
<script src=”http://www.google-analytics.com/
urchin.js”type=”text/javascript”>
</script>
<script type=”text/javascript”>
_uacct = ‘UA-XXXXXX-X’;
var combination = getcombo();
urchinTracker(‘/originalpagename.htm?
Combination=’ + combination);
</script>
This simply adds the combination number to the page name and sends it to Google Analytics. It is important that you only use this code on pages that are running an Optimizer Experiment.
UPDATED June 14th, 2007:
There was originally an error in the algorithm used in the script above. To view the details of the error you can go to Ophir’s article. A big thanks goes out to Ophir for finding this error and correcting it. That being said, there are some new instructions for using this script.
In the getcombo() function, you need to enter in the number of combinations you have in each section. So, for example, if you have 4 variations in the first section, 2 in the second, and 3 in the third, you would call getcombo(‘4-2-3’). If you only have one section, you don’t need to make any changes.
Thanks again to Ophir for testing, finding, and fixing the error. This is just another great example of why blogging and open source code can be great partners.
END OF UPDATE
Note also that you need to use the original page name in the urchinTracker call. So if we are testing ‘trial.htm’, we enter in
urchinTracker(‘/trial.htm?Combination=’ + combination);
3. Filter out the combination data from main profiles within Google Analytics
Why? Because otherwise all of your combinations will show up in your reports, causing ugly and confusing reports. All you have to do, as long as you have included the appropriate page name in the urchinTracker function, is add ‘Combination’ to your list of excluded query parameters. This will keep those combinations from showing up in your main profile. I recommend setting up a separate profile just to track your experiment data.
So why would you ever put yourself through this? Because the rewards can be great.
This is a report you would normally see in Google Website Optimizer:
Click to see the larger imageAs you can see, only conversion rate is used to measure the success of a combination. What about other metrics? Here is an example of the things you can see if you use this integration. I hope you agree that this information is very valuable.
Click for Instructions for New Google Analytics Interface
Instructions for Old Google Analytics Interface:
For Unique Views, Pageviews, Avg. Time, %Exit, and $Index, along with Cross-Segmenting and Data-Over-Time, use the Dynamic Content Report. Find the page you are testing and drill down to see something like this:
Click to see the larger imageFor Bounce Rate data (for landing pages), use the Entrance Bounce Rates report:
Click to see the larger imageFor conversion rates of multiple goals and preliminary navigation analysis, you could use the Initial Navigation Report:
Click to see the larger imageYou can even get information about the full navigation resulting from the combinations using the All Navigation report.
Whew! If that were all you could do, that would be pretty cool, right? Well, there’s more! Because the data is showing up in Google Analytics, it can be subjected to the same settings and filters that you use to segment data. You can exclude internal traffic, or use cross-segmenting to see if the source of the traffic had an impact on test results (like all AdWords traffic, for example). I’m not going to get into everything you can do, but there is an absolute ton.
Well, I hope you survived the article, and that you find this implementation useful. I think there are tons of applications for this, and I’d love to hear your comments about this tool. Thanks for reading!