Chapter 16. Google Analytics and Google Website Optimizer

The final chapter in Part V of Your Google Game Plan for Success will discuss the merging of Google Analytics and Google Website Optimizer (GWO). These two programs naturally go together — so much so that Google has released code-compatibility fixes for users running experiments with Google Website Optimizer and tracking website traffic with Google Analytics.

The two foci of this chapter are ensuring that your Google Website Optimizer Tracking Code isn't interfering with your Google Analytics Tracking Code, and interpreting report data in Google Analytics to augment your experiment data from Google Website Optimizer. As you learned in Chapter 11, Google Website Optimizer provides a limited (but powerful) amount of data. You know only how many people visited the experiment page(s) and how many of those visitors converted. With Google Analytics you'll be able to add powerful layers of data on top of what you already know from Google Website Optimizer.

Before you can start analyzing your data, you need to ensure that your tracking codes are working together, and not interfering with each other. First, let's review the tracking code compatibility.

Tracking Code Compatibility

As I mentioned in Chapter 13, you'll need to ensure that your Google Website Optimizer code is not interfering with your Google Analytics code. In the early days of Google Website Optimizer the pageTracker function was a part of the code snippet, which caused problems with the Google Analytics Tracking Code (which also uses pageTracker). Now Google Website Optimizer uses a gwoTracker command, which does not interfere with Google Analytics.

Using GA and GWO on One Domain

If you're running a Google Website Optimizer experiment while tracking your website with Google Analytics, you'll need to ensure that the Google Website Optimizer Tracking Code appears after (below) the Google Analytics Tracking Code. That's all that you'll need to make sure of if you're using the ga.js version of the Google Analytics Tracking Code. If you're using the async version this shouldn't be an issue at all, as the async tracking code is to be installed within the <head> section of your page's source code.

The following code snippets show a quick example of what the code should look like on your page, with the Google Analytics Tracking Code placed above the Google Website Optimizer Tracking Code.

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol)
? " https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost +
"google-analytics.com/ga.js '
type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-1234567-1");
pageTracker._trackPageview();
} catch(err) {}
</script>

<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+ '.google
analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-1234567-2");
gwoTracker._trackPageview("/123456789/test");
}catch(err){}
</script>

Make sure that you use this order for your original page, your variation page(s), and your experiment conversion page. For more detail about where to install the Google Website Optimizer Tracking Code, flip back to Chapter 13. Remember that you can't simply copy the code examples shown from this book — you'll actually have to log in to your Google Website Optimizer account and grab the code from there (as it includes your UA account number).

Using GA and GWO on Sub-Domains

Not everyone who wishes to run a Google Website Optimizer experiment uses only one domain for his or her website efforts. Many people — especially those with shopping carts — use separate sub-domains that visitors must travel across in order to complete their purchases or other important actions. Google Website Optimizer does offer an officially supported work-around that gives you an alternative to using its product across sub-domains (there are some unofficial work-arounds posted online that may or may not work).

Whether you're running the new async code, the older ga.js model, or the legacy urchin.js version of the Google Analytics Tracking Code, you'll need to add an "urchin-style" customization before the Google Website Optimizer control script on any page that contains the Google Website Optimizer Tracking Code. You're also going to need to update the tracking and conversion scripts to include a call to setDomainName, as you would in order to track sub-domains with Google Analytics.

First, here's the addition to the control script featuring the _udn function. This example shows the _udn function immediately above a control script.

<script>
_udn = ".example.com";
</script>
<!-- Google Website Optimizer Control Script -->
<script>
function utmx_section(){}function utmx(){}
(function(){var k='123456123456',d=document,l=d.location
c=d.cookie;function f(n){if(c){var i=c.indexOf(n+'='),
if(i>-1){var j=c.indexOf(';',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var
x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+
'.google-analytics.com'+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')
+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
</script><script>utmx("url",'A/B'),</script>
<!-- End of Google Website Optimizer Control Script -->

Next, on the Google Website Optimizer tracking snippet and conversion snippet, you'll need to add the call to setDomainName to tell Google Website Optimizer that your experiment involves separate sub-domains:

gwoTracker._setDomainName(".example.com");

Here's an example of a Google Website Optimizer tracking snippet using setDomainName:

<!-- Google Website Optimizer tracking script -->
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+ '.google
analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-1234567-2");
gwoTracker._setDomainName(".example.com");
gwoTracker._trackPageview("/123456789/test");
}catch(err){}
</script>
<!-- End of Google Website Optimizer Tracking Script -->

And here's an example of the Google Website Optimizer conversion code using setDomainName:

<!-- Google Website Optimizer conversion script -->
<script type="text/javascript">
if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
(document.location.protocol=='https:'?'s://ssl':'://www')+ '.google
analytics.com/ga.js"></sc'+'ript>')</script>
<script type="text/javascript">
try {
var gwoTracker=_gat._getTracker("UA-1234567-2");
gwoTracker._setDomainName(".example.com");
gwoTracker._trackPageview("/123456789/goal");
}catch(err){}
</script>
<!-- End of Google Website Optimizer conversion Script -->

Once you're finished, re-upload your experiment pages live, and you'll be all set for tracking Google Analytics and Google Website Optimizer across sub-domains.

Now that you're receiving experiment data in Google Website Optimizer, let's take a deeper look at what data Google Analytics has to offer to augment your analysis and website improvement efforts.

Analyzing Google Website Optimizer Data in Google Analytics

Google Analytics has more than 100 reports, dozens upon dozens of options for users (including views, segments, menus, and filters), and leadingedge advanced features like Advanced Segments and Intelligence. You can leverage the power of Google Analytics to augment your Google Website Optimizer data. Once you know where to go and what you're looking for, you'll readily use Google Analytics to evaluate your test pages and your visitor behavior for each experiment that you run. You'll rediscover Google Analytics and reignite that spark that you had when you discovered it for the very first time.

Annotations

In Part III of Your Google Game Plan for Success you learned about the ability for users to insert annotations — small, informational, 160-character sentences — to add what Google Analytics calls "tribal data" to the system, allowing you to match offline knowledge with online traffic statistics. Naturally, you'll want to make use of annotations for every important action involved in your Google Website Optimizer experiments. When your experiment launches, insert an annotation into Google Analytics. When Google Website Optimizer finds a winning combination, make a note of it using annotations. When you run your follow-up experiment, be sure to insert a note into Google Analytics using annotations. When a combination receives its 50th conversion, denote that by creating an annotation. You get the idea — when something significant happens with Google Website Optimizer, use annotations in Google Analytics. Figure 16-1 shows an example of what it could look like to do this in your account. I've added several annotations to this particular account, denoting important tidbits of information about Google Website Optimizer and a new Google AdWords campaign that I launched to run concurrently with my experiment and my subsequent follow-up experiments.

Remember that annotations do not appear only on your dashboard's trending graph; they appear on every trending graph throughout Google Analytics. Also remember that you can set annotations as private (so that only you can see them) or as public (so that any user with access to your profile can see them). Refer to Chapter 9 for more information about creating annotations.

Advanced Segments

Chapter 9 introduced you to Advanced Segments — default or custom options that you can enable "on the fly" that allow you to slice and dice data to obtain a deeper understanding of it. While Google Analytics comes equipped with some very useful default segments like Visits with Conversions and Paid Search Traffic, you can create your own segments for your needs.

An obviously useful Advanced Segment that you can create is one where the dimension is the landing page that matches the name of the experiment page(s) you're running in Google Website Optimizer. An Advanced Segment landing page for Google Website Optimizer is shown being edited in Figure 16-2.

Annotations including information about Google Website Optimizer

Figure 16-1. Annotations including information about Google Website Optimizer

Creating Google Website Optimizer—friendly Advanced Segments

Figure 16-2. Creating Google Website Optimizer—friendly Advanced Segments

Custom Reports

As you also know from Chapter 9, custom reports are powerful, customizable views for your data. With them you can organize your data in ways that are meaningful and valuable to you, without having to rely upon the default reports that Google Analytics provides. In Figure 16-3 I've created a custom report that will help me analyze my Google Website Optimizer data, taking my understanding of the experiment far beyond what's possible within the Google Website Optimizer interface.

Creating a custom report for Google Website Optimizer data

Figure 16-3. Creating a custom report for Google Website Optimizer data

In Figure 16-3 my metrics going across the scorecard horizontally are (from left to right) Entrances, Bounces, Average Time on Page, Visits with Search, Total Goal Completions, Goal Conversion Rate, Unique Purchases, and Revenue. My dimensions going down the report (from top to bottom) are Source/Medium, Keyword, and Visitor Type.

When I save and apply this report within my Google Analytics profile, I'll be able to take it a step further and apply the Google Website Optimizer Advanced Segment that I created a few pages ago. This way I'm looking at Google Website Optimizer landingpage data in a report that I built specifically for Google Website Optimizer. It doesn't get any sweeter than that.

All Traffic Sources

From this point forward you could theoretically use any report with Google Analytics to view your Google Website Optimizer data, once you've created Advanced Segments and custom reports to match. One of my favorites to use for such analysis is the All Traffic Sources report, shown in Figure 16-4. I once again have applied my Google Website Optimizer Advanced Segment, and I used the standard table filter to view only organic traffic sources.

The All Traffic Sources report with my Google Website Optimizer Advanced Segment applied

Figure 16-4. The All Traffic Sources report with my Google Website Optimizer Advanced Segment applied

Map Overlay

The Map Overlay report (segmented by landing page or your own Google Website Optimizer-style Advanced Segment) can be a great source of information for you. Perhaps geo-targeted Google AdWords campaigns drive a lot of traffic to your Google Website Optimizer experiment pages; depending on any campaign's regional performance and experiment results, you can optimize your paid search campaigns accordingly. Figure 16-5 shows an example of the Map Overlay report with my Google Website Optimizer Advanced Segment enabled. I am looking at city-level detail for the United States, and my metric is set to goal-conversion rate in the report.

New vs. Returning

You can use the New vs. Returning report to see the difference in website statistics and performance metrics between first-time (new) visitors and repeat (returning) visitors. This is actually a very useful report because Google Website Optimizer does not report on returning visitors. The reports in Google Website Optimizer show you only visit and conversion data from new unique visitors. This report can help identify how experiments affect the returning visitors who were previously exposed to your Google Website Optimizer experiment. New vs. Returning is also an Advanced Segment, so you can apply it as an Advanced Segment and compare it to a Google Website Optimizer—style Advanced Segment. Figure 16-6 shows my New vs. Returning visitors report with the Comparison to Site Average Table view enabled.

The Map Overlay report, with city-level detail and the goal-conversion rate metric applied

Figure 16-5. The Map Overlay report, with city-level detail and the goal-conversion rate metric applied

Mobile Devices

If you're like me, you're obsessed with mobile traffic on your site. If you're really like me, you want to know how many people use mobile devices and what those people do on your site. Are they engaging with your Google Website Optimizer experiment and visiting key pages? The Mobile Devices report shown in Figure 16-7 can give you an idea of what types of mobile devices are being used during your Google Website Optimizer experiments (hint: most of the traffic will come from iPhones, by far the most popular mobile device). Here I'm analyzing the pages-per-visit metric in the Performance Table view.

The New vs. Returning report with a Google Website Optimizer Advanced Segment enabled

Figure 16-6. The New vs. Returning report with a Google Website Optimizer Advanced Segment enabled

The Mobile Devices report with the Performance Table view applied

Figure 16-7. The Mobile Devices report with the Performance Table view applied

Goals Overview

As you know from Chapter 11, when you run an experiment using Google Website Optimizer, you choose experiment pages and one conversion page. However, for a lot of websites, there are multiple touch points that a visitor can reach in order to have what the website owner will consider a successful visit. Just because Google Website Optimizer shows you data for only one conversion point doesn't mean that you can't augment your understanding of your visitor's behavior by analyzing that behavior against all your site's goals. Figure 16-8 shows the Goals Overview report, with my Google Website Optimizer segment applied. Now, you can really get a deep understanding of the true impact of your Google Website Optimizer experiments by viewing what goals the visitors actually converted on, and not only the goal that you defined within the Google Website Optimizer interface.

The Goals Overview report with a Google Website Optimizer Advanced Segment enabled

Figure 16-8. The Goals Overview report with a Google Website Optimizer Advanced Segment enabled

Reverse Goal Path

Quite a few of my fellow web-analytics colleagues dislike the Reverse Goal Path report in Google Analytics. They think it is very limited and unusable in its current state. Personally, I think it does serve its purpose and can be useful, especially for using Google Website Optimizer data to understand the paths that visitors take before they convert. As you know from Chapter 7, the Reverse Goal Path report shows you the last four pages viewed by a visitor before converting. Applying an Advanced Segment designed with Google Website Optimizer in mind, you can get an even deeper understanding of the ways in which your experiments are affecting visitors. See Figure 16-9 for an example of this report.

The Reverse Goal Path report

Figure 16-9. The Reverse Goal Path report

Creating a Duplicate Proffile for Your Google Website Optimizer Data

If you have a keen eye (which I know you do — you're reading this book!), you will have noticed at the beginning of this chapter (and Chapter 11) that the Google Website Optimizer Tracking Code's UA number is slightly different from the Google Analytics Tracking Code's UA number. When you create an experiment with Google Website Optimizer, you create a placeholder for a future profile in Google Analytics (you actually create much more than that — basically, Google needs a place to store and process your experiment data as it collects that data, so it reserves a profile number specffically for Google Website Optimizer). After creating an experiment, click Create New Proffile from within your Google Analytics account, and you should notice within the URL selection drop-down menu an entry for Google Website Optimizer. Creating the profile with this as the selected URL will allow you to store all Google Analytics data from visitors who were exposed to your experiment.

You should consider creating this duplicate profile because not every report in Google Analytics can use Advanced Segments. Reports like the Keyword Positions report in the AdWords section, Funnel Visualization, and Unique Visitors cannot be segmented by an Advanced Segment. When you view your data through this new profile, it's as if you're pre-segmenting your visitors (because they came from your Google Website Optimizer experiment). You can use this second profile for regular analysis efforts as well.

The Your Google Game Plan for Success experience is winding down into the final two chapters and an appendix. In those chapters I'm going to discuss additional tools, resources, and programs (within the Google ecosystem and outside of it) that you can take advantage of, and some other interesting things like ways to contact me, blogs to read, and Twitter accounts to follow. I hope you saved room for the proverbial dessert!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.149.45