“Enterprise” Google Analytics

August 26, 2008 by Justin Cutroni

Is Google Analytics an “enterprise” class analytics solution? That’s debatable, and in fact, it has already been debated.

In my opinion, it depends. It depends on your analytics needs.

We’ve worked with plenty of “enterprise” class organizations that were new to web analytics. They had very simple needs and GA met most of them easily. We’ve also told companies that GA is not right for them because it did not fit their core needs.

Your organization may be different. You may need a tool that integrates with ODBC data sources, something that GA doesn’t do very well. If that’s the case then you might need to go with a different tool. But again, it all depends.

Google Analytics Enterprise-ness

But the point of this post is not to debate GA’s “enterpise-y-ness”, but to address some of the common issues that we usually see during an enterprise installation.

Issue #1. Tracking All Sites Logically

Major League Baseball

Large organizations tend to have more sites, and more sites mean more data. Collecting the data in an organized fashion, that allows room for growth and appropriate access for users, takes time and planing.

During an enterprise implementation we usually create a series of accounts and profiles that segments the data based on business logic and access needs. We create a data hierarchy that provides high level aggregate tracking across the entire online experience (i.e. roll-up reporting) and detailed tracking for each individual property.

Let’s consider the websites for Major League Baseball. Each team has their own site located on a subdomain. There is also an MLB store and different micro sites dedicated to things like the All Star Game and the World Series.

Lots of content on many different sites. While the exact implementation solution will depend on their specific needs, it probably involves collecting all the data in a single profile for roll-up reporting and then creating profiles for each team and micros site for detailed reporting.

Issue #2. Unique Visitors

Tracking lots of domains usually leads to an issue with unique visitor tracking. GA uses a first party cookie to identify each visitor. This means that if a visitor visits 3 different domains they will receive 3 different cookies and appear as three different unique visitors.

Now, I know GA has a cross domain tracking feature. But what happens if an enterprise wants to know the unique visitor count across 50 web properties? Installing cross domain tracking on that scale is a huge task. In fact, it’s a pain in the ass.

Many of the clients that I’ve worked with have compromised and ignored unique visitor tracking.

You may be different. Unique visitors may the one critical metric that you can’t live without. Could you use GA? Maybe, but you should carefully weigh the implementation needs vs. your analysis needs.

Unique Visitors are Unique!

Issue #3: Page Tagging

When I first started working with GA I never thought that tagging pages would be an issue, but it is. It’s not so much a technical issue as it is an organizational issue. Big companies can have so many sites with some many nooks and crannies. It can take a lot of work to identify every site, find an owner and then get the tags placed in the appropriate place.

And let’s not forget non-HTML pages. Tracking non-HTML content with Google Analytics can be a huge challenge. You can’t slap a JavaScript Tag on a PDF. When we work with large organizations we usually help then develop an automated click tracking script. This takes more time and more effort and doesn’t always work (usually due to page rendering delays).

Issue #4. URL Structure

URL Structures can be manually created using Google Analytics.

This is probably one of the most difficult challenges we face when working with large sites that have hundreds of thousands of pages. GA will only track 50,000 unique URLs per day. While this is completely adequate for most sites “enterprise” sites can exceed this limit, especially if the site is content based (think about a some of today’s largest community sites, they have forums, blogs, and tons of user generated content).

What happens when you fill GA with 50k unique URLs in a day? You start to see ‘(other)’ in your content reports and you can no longer identify which pages visitors are viewing on your site.

To resolve this issue we usually need to create some type of bucketing strategy to ‘roll up’ pageview data into different content categories. This is normally done by matching requested URL patterns at the server level, and then generating a ‘virtual’ pageview in GA.

Sometimes we segment the data into different profiles, thus giving us more ‘buckets’ to store the data.

Again, the exact solution depends on many different factors, but this issue can be mitigated with some effort.

Issue #5. Campaign Tracking

This is a problem for everyone! I find very few clients whoa are diligent about tracking their marketing campaigns using link tagging. A general rule of thumb, the bigger the client the more challenging it is to track all online campaigns. Why?

Big organizations have different people running different campaigns. Many times they’re using one or more agencies to help run their campaigns. Getting everyone to use a cohesive link tagging strategy is a lot of work due to the sheer number of people that are involved. This is more of a training/process issue rather than a technical issue.

Wrapping Up

If you’re an enterprise organization, or consider yourself an enterprise organization, don’t discount GA without taking a hard look at your real analytics experience and your needs. GA might just work for you.

If you do decide to use GA don’t expect to slap the tags on your site and finish the configuration in a week. Like every tool out there, it takes time and planning to get things right.

Do you have experience with GA in a large, “enterprise” environment? Leave a comment and share your thoughts.

Subscribe:

Tying clicks & content to conversion in GA

July 20, 2008 by Justin Cutroni

Many site owners spend a lot of time creating content that is supposed to drive conversions. But what’s the best way to measure the performance of this content with Google Analytics? How can we measure a specific piece of content, be it a page or a piece of creative, and it effect on conversions?

Google Analytics has a metric called $Index to help measure the “value” of site pages. But the problem with $Index is that it is an average, and averages can be skewed very easily. $Index is about the performance of a page, not the content on a page. Also, many people want to know how many times a piece of content directly led to a conversion. We just can’t get that with $Index.

We could view this type of analysis as a navigation analysis. Google Analytics has the All Navigation report and the Initial Navigation report, but these reports track things that happen in under 3 clicks and not everyone converts in 3 clicks.

Rather than tackle this problem using navigational analysis, let’s consider it a content challenge. What we want to do is see if a specific piece of content ultimately lead to conversion.

Google Analytics site overlay report.

Given this approach we could use the Site Overlay report, which is supposed to show the performance of each link on a page. But, in my experience, the Site Overlay report is buggy at best (and I’m being nice).

We need is a way to link a piece of content, i.e. a pageview, to a conversion. There’s a very simple way to do this using the Funnel Visualization report.

The Concept

Each funnel has a ‘required step’ setting. When enabled, this setting requires that the visitor views the first step in the funnel prior to conversion. If the visitor does not see the first step then the Funnel Visualization report will not count a conversion. The conversion will still be recorded in all other reports, but not the Funnel Visualization report.

What few people know is that it does not matter when the ‘required step’ is viewed, as long as it is viewed prior to the conversion.

We’re going to use this setting to associate a conversion with the content we want to evaluate.

Example

Let’s say I want to track how many people view the About Me page on this blog before subscribing to my RSS feed. I can create a goal and funnel that links the About Me pageview to the RSS subscription goal.

Step 1: Set up the goal

The first step is to create the goal. Just set up the goal like any other normal goal. Identify the goal URL, give the goal a name and a value (if you so desire).

Google Analytics goal settings

Step 2: Identify the “required step”

Now let’s turn to the funnel. Remember, step 1 in the funnel, the ‘required step’, is really the piece of content (i.e. the pageview) we want to evaluate in terms of conversions. Simply add the page URL to the Step 1 URL field, give the step a name, and check the “required step” checkbox.

Google Analytics funnel settings.

That’s it! There’s nothing else to do. The funnel visualization report, for this specific funnel, will only show a conversion if the visitor views the About Me page at some point prior to conversion. GA doesn’t care when the visitor sees the page, as long as they see the page prior to conversion.

The Data

Here’s a sample Funnel report. We can see that 4 conversions occurred after viewing the about me page. Remember, it does not matter when the About Me page was viewed, as long as it was viewed prior to conversion.

Google Analytics funnel visualization report.

Now, if we compare the number of conversions in the Funnel Visualization report, to the overall number of conversions for this goal, we notice there is a difference.

Google Analytics goal conversions.

The difference is the number of visits that did not include the About Me page prior to subscribing to the RSS feed. There were 8 total RSS Subscription conversions, but only 4 of those conversions viewed the About Me page prior to converting. Now we know how effective the About Me page was at driving RSS subscriptions.

Taking it Further

What about associating a set of pages with a conversion activity? No problem, just use a regular expression to define your required step. Here’s the same example, but I’ve tweaked to to track visits that include the About Me page or the All Posts page.

GA funnel to associate multiple pages with a goal.

And remember, the pageview you specify for your required step does not need to be a real “pageview.” It can be a virtual pageview, generated with the pageTracker._trackPageview() method. In fact, that’s what I’m doing on the blog. I generate a virtual pageview every time someone clicks on the RSS icon.

This technique is very useful if you want to measure how well a specific piece of content on a page is performing. Generate a pageview when a visitor clicks on the content and use it as step 1 in the funnel.

Think this is a good idea? Got one that’s better? Leave a comment!

Subscribe:

Google Analytics E-Commerce Tracking Pt. 1: How It Works

January 13, 2008 by Justin Cutroni

This post is the first in a series of e-commerce transaction tracking with Google Analytics. Why is e-commerce tracking important? Well, transaction data is a vital piece of information when analyzing online business performance.

Sure, it’s great to measure things like conversion rate, but revenue is much more tangible to many business owners. Having the e-commerce data in your web analytics application makes it easier to perform analysis. Do you need to set up e-commerce tracking? No, but it sure helps. :)

The Big Pictures

E-commerce tracking is based on the same principal as standard pageview tracking. JavaScript code sends the data to a Google Analytic servers by requesting an invisible gif file. The big difference is that e-commerce data is sent rather than pageview data.

But how does Google Analytics get the e-commerce data? That’s the tricky part. You, the site owner, must create some type of code that inserts the transaction data into the GA JavaScript. Sounds tricky, huh? Well, its not that bad.

Step by Step: How it Works

Let’s break it down and walk through what actually happens.

1. The visitor submits their transaction to your server.

2. Your server receives the transaction data and processes the transaction. This may include a number of steps at the server level, such as sending a confirmation email, checking a credit card number, etc.

3. After processing the transaction the server prepares to send the receipt page back to the visitor. While preparing the receipt page your server must extract some the transaction data and insert it into the Google Analytics JavaScript. This is the code that you must create.

4. The receipt page is sent to the visitor’s browser.

5. While the receipt page renders in the visitor’s browser the e-commerce data is sent to Google Analytics via special GA JavaScript.

Here’s a basic diagram of the process. Again, the biggest challenge during implementation is adding code to your web server that inserts the transaction data, in the appropriate format, into the receipt page. I’ll cover the setup in part 2 of this series.

What Data can be Tracked?

Google Analytics collect two types of e-commerce data: transaction data and item data. Transaction data describes the overall transaction (transaction ID, total sale, tax, shipping, etc.) while item data describes the items purchased in the transaction (sku, description, category, etc.). All of this data eventually ends up in GA reports. Here’s a complete list of the data:

Transaction Data

  • Transaction ID: your internal transaction ID [required]
  • Affiliate or store name
  • Total
  • Tax
  • Shipping
  • City
  • State or region
  • Country

Item Data

  • Transaction ID: same as in transaction data [required]
  • SKU
  • Product name
  • Product category or product variation
  • Unit price [required]
  • Quantity [required]

A few notes about the data. First, the geo-location data is no longer used by Google Analytics. The new version of GA tries to identify where the buyer is located using an IP address lookup.

Also, you should avoid using any non-alpha numeric characters in the data. Especially in the numeric fields. Do not add a currency identifier (i.e. dollar sign) in the total, tax or shipping fields. this can cause problems with the data.

Like this post? Check out the rest of the series:

Google Analytics E-Commerce Tracking Pt. 2: Installation & Setup
Google Analytics E-Commerce Tracking Pt. 3: Why EVERYONE Should Use It
Google Analytics E-Commerce Tracking Pt. 4: Tacking Lead Gen Forms

Subscribe:

2008 Google Analytics Resolutions

January 8, 2008 by Justin Cutroni

Happy new year! I can’t believe 2007 is over. Continuing with a tradition I began last year, I give you my 2008 GA resolutions.

Before I get into the list, I want to thank everyone who reads and contributes to Analytics Talk. 2007 was an incredible year for me, and I really owe a lot to you guys. Thank you for reading, posting questions and helping me learn so much.

1. I will migrate to the new GA.JS tracking code.

Google announced a new version of the tracking code, ga.js, in October 2007 and launched the new code in December. After some minor launch problems things seem to be running smoothly. While you don’t need to migrate to ga.js, you should start to think about it because Google will no longer add features to urchin.js. In my opinion, you should tackle this problem sooner rather than later.

2. I will contemplate Event Tracking and how I can use it.

The reason Google introduced a new version of the tracking code was to enable a powerful new feature called Event Tracking. While most folks might think of event tracking as a ‘web 2.0′ tracking tool geared towards video players and Ajax, it’s really a flexible framework for data collection. I was skeptical at first, but now I’m a convert. All of us can take advantage of this new feature.

I’ll be writing more about Event Tracking and its uses when Google pushes the feature to everyone. In the mean time, check out this series of posts to learn more:

Event Tracking Pt. 1: Overview & Data Model
Event Tracking Pt. 2: Implementation
Event Tracking Pt. 3: Reporting & Analysis

3. I will get creative with profiles.

This is something I’ve been talking about for a while. Profiles are so much more than website data. They’re a collection of data and business rules. Last year, as part of my 2007 resolutions, I mentioned setting up test profiles as a way to insure your configuration settings are correct.

For 2008 I suggest setting up profiles for all major marketing campaigns and mediums. Why? So you can segment reports that normally can not be segmented. Check out Segmenting Visitor Loyalty Reports in GA for more information.

4. I will try some type of ‘advanced’ Google Analytics configuration.

Most of us have a fairly basic implementation of GA. We don’t need to do much more than add the tracking code to our site, set up goals, and configure on site search reporting.

Why not try something new this year? How about using an ‘advanced’ feature like custom segmentation, event tracking or even e-commerce tracking? All of these features can help you learn more about your visitors and what they do. That’s why we use these features and try these hacks: to gain insight and knowledge.

5. I will keep track of website changes and Google Analytics changes.

This is something that I wrote about a long time ago, but it’s still really important. It’s a good idea to keep track of your GA configuration changes so you can better understand the data. Any modifications, like a change to a goal, funnel or filter, should be recorded.

It’s also a good idea to keep track of website changes and online marketing changes. Knowing what’s going to happen with your online business helps drive analysis and you’ll be able to deliver data that will make people happy.

You don’t need anything elaborate, a simple Google Spreadsheet, like this one, will work just fine.

There you have it, a few ideas to spice up your 2008 Google Analytics plans. Got a better idea or think that I missed something? Leave a comment below. And happy new year!

Subscribe:

My Regular Expression Tool Box

December 10, 2007 by Justin Cutroni

Love em or hate em, regular expression are a part of Google Analytics. They provide a lot flexibility but at a price. Small mistakes can become magnified and result in poor data quality.

I know there’s a lot of information out there about regular expressions, but I wanted to simplify the topic. In my opinion, here are the most important things to know.

Key Concept: How GA Regular Expressions Work

Let’s start by talking about how regular expressions work in Google Analytics. In general, we apply a regular expression to a piece of data. If the expression matches ANY part of the data then the expression will return TRUE. If the expression returns TRUE then some action will occur.

It doesn’t matter where you use the reg ex. If it’s part of an exclude filter, and the expression matches the data, then the data will be excluded. If it’s part of an include filter then the data will be included. If it’s part of a report filter then the report will only contain info that matches the reg ex. You get the idea.

How Google Analytics Filters Work
[In this image think of the data as the square cube and the red work bench as the regular expression. If the cube is the same shape as the hole in the bench then an action happens; the cube falls through. Get it?]

It’s really important to understand this because it simplifies the expressions we need to create. Let’s say I want to identify all the keywords in a set of data that contain the term excel. Here’s the full list:


word
excel
ms excel
excel 2003
linux
microsoft excel
excel 2007
excel makes pretty graphs
google

Rather than create some fancy regular expression, I can simply use: excel. After the expression is applied to the data we’ll have the following sub-set:


excel
ms excel
excel 2003
microsoft excel
excel 2007
excel makes pretty graphs

This simplifies the creation of your expression because you only need to match part of the data that you’re looking for. With that in mind, let’s move on to some tips that cover the most common uses of regular expressions.

Tip #1: Use Anchors

Regular Expression AnchorsAnchors are a way to specify if a regular expression should match the begining of the data or the end of the data. Remember, reg ex works by matching ANY PART of a piece of data. Sometimes we’re looking for data that starts or ends a particular way and that’s why we need anchors. Let’s go back to the excel example.


word
excel
ms excel
excel 2003
linux
microsoft excel
excel 2007
excel makes pretty graphs
google

Suppose I only want to see the items that END with the word excel. Well, if I use the regular expression excel, I’m going to get all the items that contain the word excel no matter where it appears.

I need to create a reg ex that means, “ends with.” That’s done by placing a dollar sign, $, at the end of my reg ex. So the expression to find all of the keywords that END with excel would be: excel$.

It would match the following items from our list:


excel
ms excel
microsoft excel

To find all of the keywords to START with excel use a carrot, ^, at the beginning of the regular expression, like this: ^excel. It would match the following items from the list:


excel
excel 2003
excel 2007
excel makes pretty graphs

Now, let’s say I want just the keyword excel. Here’s how that expression would look: ^excel$.

Anchors, pretty handy.

Tip #2: Find This OR That

ORMany times in an analysis we’ll want to find multiple items from a set of data. For example, let’s say I want to find all the keywords that contain the name of an MS Office product. The complete list of keywords is:


word 2007
microsoft excel
outlook express
powerpoint
windows 95
mac OSX
linux
google rocks

Again, I’m only interested in the MS Office products, so I need to create an expression that includes the names of all the products. I want to find word OR excel OR outlook OR powerpoint. The pipe character, |, is used to represent OR logic. The following expression will return true if any of the items occur in the data:


word|excel|outlook|powerpoint

And here are the results:


word 2007
microsoft excel
outlook express
powerpoint

Tip #3: If in Doubt, Escape it Out!

The dangerous thing about regular expressions is that we often don’t know what we don’t know. There are a lot of characters that have special meaning in reg ex. The plus sign, the question mark and the period are just a few. Inadvertently using a special character in an expression can lead to big trouble. There is an easy way to protect yourself: escaping.

Escaping a character means that GA will interpret the character as a LITERAL character and not as a regular expression character. To escape any character place a backslash in front of the character. Here’s the great part. It doesn’t matter if you escape a non-special character. To me, escaping a character is like using a safety net. If you’re unsure if a particular character is a special character, escape it. It can’t hurt your expression.

Time for an example. Let’s say we want to create a goal based on the following URL:


index.php?id=34

I need to turn the above into a regular expression. The question mark and period are special characters so they need to be escaped. But I’m not sure about the equal sign. I better escape just to be safe. So here’s how the resulting reg ex would look: index\.php\?id\=34. By the way, the equal sign is not a special character.

So there you have it. My two cents on regular expressions. These tips just scratch the surface of what you can do with Reg ex. If you really want to learn about reg ex check out my friend Robbin’s series on the subject.

Subscribe:

Tracking Sub Domains with Google Analytics

November 19, 2007 by Justin Cutroni

Tracking websites that have multiple sub domains may not seem like a complicated thing. In fact, the GA support docs clearly outlines two ways to track sub domains. You can track all sub domains in a single profile or you can track sub domains in separate profiles.

But what if you want more flexibility? What if you want to track one group of sub domains in one profile and a different group of sub domains in another profile? Or what if you want to create new profiles for a different groups of sub domains in the future?

I like to use an approach that let’s you decide how you want to group sub domain traffic. This setup will give you the most flexibility now and in the future. Some of the benefits include:

1. It let’s you collect all data in a master profile. This facilitates ‘roll up’ reporting and gives you an easy way to measure traffic to the primary domain and all of the sub domains.

2. This technique lets you track each individual sub domain in it’s own profile which is useful for deeper analysis.

3. You can easily create new profiles in the future based on groups of sub domains.

Here’s the exact process to get this working.

1. Create Profile for The Primary Domain

The first step is to create a master profile. All other profiles for the website, including profiles for the various sub domains, will be based on this profile. When you enter the domain for the website use the primary website domain. In the example below, I’m using www.sitedomain.com as the website domain.

Google Analytics Master Profile Settings.

After creating the profile GA will display the tracking code for the site. Before you add it to your pages it must be modified. You need to force GA to use the primary website domain for the cookie domain. This modification will let you track each unique visitor across all sub domains. This in turn let’s us collect all site data in a single profile and do ‘roll up’ reporting.

Old urchin.js tracking code:


<script type="text/javascript">
_uacct = "UA-XXXXXXX-1";
_udn = "sitedomain.com";
urchinTracker();
</script>

New ga.js tracking code:



<script type="text/javascript"> 
   var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); 
   document.write("<script src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'>" + "</sc" + "ript>"); 
</script>


<script type="text/javascript">
var pageTracker = _gat._getTracker("UA-XXXXXX-1");
pageTracker._setDomainName("sitedomain.com");
pageTracker._initData();
pageTracker._trackPageview();
</script>

Use this profile as a way to measure overall traffic across all of your sub domains. To facilitate page analysis in this profile add a filter that concatenates the hostname to the Request URI, which is the piece of data in the Top Content report. This will help you differentiate traffic to pages with the same URI that may reside on different sub domains.

20071118-hostname-request.png

A handy report that you’ll want to use in this profile is the Visitors > Network Properties > Hostnames report. This report will show traffic to the primary domain and all of the sub domains. It’s an easy way to compare traffic to the various sub domains.

2. Create Profiles for All Sub Domains

Once you have created the master profile you can start creating profiles for each of the sub domains. Remember, each sub domain profile is based on the master profile, that we created in step 1. Here’s how to set up the new profile:

20071118-sub-profile.png

Now that you’ve created the profile, make sure you add the tracking code to the pages on the sub domain. The tracking code for the sub domain is the same as the tracking code that goes on the primary domain (it’s the code from step 1).

3. Add Filters to Sub Domain Profiles

The next step is to add a filter to the sub domain profile so it only contains data for the appropriate sub domain. This is done using an include filter based on the hostname. Once this filter is in place you’ll have the master profile which will contain data for all sub domains, and this profile that will contain data for a specific sub domain.

Filter to create a GA sub domain profile

To create additional profiles for other domains just repeat steps 2 and 3. Obviously the settings for the filter used in step 3 will depend on the sub domain that you want to include in the profile.

Creating Additional Profiles

Let’s say you need to create a profile for two sub domains: 1.website.com and 2.website.com. This can easily be done because the same tracking code is on both sites. All you need to do is add an include filter with the following settings:

GA Filter settings for 2 sub domains.

While Google’s documentation describes a good way to track sub domains, I think this approach is better due to it’s flexibility. Plus, because the same tracking code is used all all sub domains you don’t need to worry about placing the wrong tracking code on a sub domain.

Good luck with your setup!

Subscribe:

Make GA Data Quality Suck Less!

November 6, 2007 by Justin Cutroni

Frustrated with GA Data?  Get a grip!We all know that data quality sucks! But there are a few, vital steps that you can take to insure that your Google Analytics data is as accurate as possible. Remember, accurate data makes for happy, and accurate, analysts.

Here are three simple tips that can help make your data more accurate.

1. Eliminate Duplicate Data

Many sites that I work on have duplicate data. The usual cause is mixed case URLs. Google Analytics is case sensitive, it captures the data exactly as it appears in the location bar of the browser. So if a URL is of mixed case in the browser, it will be captured and displayed in mixed case within GA.

It’s very easy to have two URLs, that have the same functional meaning, appear as two line items in GA because they have a different case. Here’s an example:


/worldseries/index.php?year=2007&keyword=lowell
/Worldseries/index.php?year=2007&keyword=Lowell

Both URLs are probably the same, they just appear different because of the case. We want to force both URLs to have the same case and thus make them appear as a single line item in GA. This can be done with a Lowercase or Uppercase filter. I like the lowercase filter, but you could easily use the uppercase filter. It’s a personal preference.

The filter below will force the Request URI to lowercase:

Google Analytics Lowercase Filter

I recommend adding a case changing filter to any data element (i.e. filter field) that could be mixed case. This includes:

  • Request URI
  • Campaign Name
  • Campaign Term
  • Campaign Medium
  • Campaign Source

Another cause of duplicate data is multiple URLs that display the same content but have a different file extension. Here’s an example:


/champions/redsox.php
/champions/redsox.htm

These URLs may appear different (because of the file extension), but the web server might interpret them as the same file. Please note that not every web server behaves this way. It all depends on your web server. Check with your IT guru if your site has URLs with multiple file extensions.

You should merge duplicates URLs, that have different file extensions, into a single line item. I find the best way to do this is with an advanced filter.

Google Analytics AdVanced Filter for URI ReWrite

Some may think that a search and replace filter is the best way to remove these duplicates. But you would need to create a search and replace filter for each set of URLs that needs to be merged. An advanced filter, because it uses a regular expression, will change every URL that ends in ‘.htm’ to a ‘.php’ extension.

2. Remove Irrelevant Information

Extra information in the URL can cause big problems in Google Analytics. The reason is that GA will capture all of the data in a URL, which includes the query string parameters. Query string parameters that don’t have a functional meaning should be removed from the URL.

An easy way eliminate these parameters is to collect data for a week and then analyze the top content report. Any query string parameter that does not provide insight into what the visitor sees or does should be eliminated.

To remove a query string parameter from GA simply add it to the ‘Exclude URL Query Parameters’ field in the profile settings:

20071104-exclude-parameters.png

Enter multiple parameters as a comma separated list.

Be aware that once you remove a query string parameter from GA it is completely eliminated from the system. So any goals, funnels or other filters that use that parameter will no longer work.

Also remember that you should remove any query string parameters that contain personally identifiable information. It is against the GA terms of service to collect PII.

3. Identify Your Segment

I could have easily named this tip ‘exclude internal data’ but I wanted to change the way we all think about profiles and the data that’s in them. I believe we should think of profile data in terms of the segment we want to analyze, not who we want to exclude. I know these statements are very close in meaning, but there is a slight difference. Segmentation is so important to analysis. I believe that every time we create a profile we should consider what segment of data it will contain.

I can think if a few segments of data that I would like to analyze:

  • CPC traffic
  • New visitors
  • Return visitors
  • European visitors
  • Traffic from a specific marketing campaign
  • Non-employee traffic
  • Traffic generated by my call center

All of the above segments can be created as different profiles using include filters. Each will provide some insight into that segment. Don’t get me wrong, you’ll probably want to exclude internal traffic from 99% of your profiles. But try to think in broader terms, focus on the segment that you want to analyze.

Creating a profile based on a particular segment of traffic is pretty easy. The first thing you want to do is identify what segment of traffic you want to include in your profile. Then create a filter based on the filter filed that represents that segment.

Let’s say I want to see all traffic generated from visitors performing some type of external search on my name. I could apply the following include filter to a profile:

Google Analytics Include Filter

This filter can easily be modified to include a specific marketing campaign (using the Campaign Name field), a specific country (using the Visitor Country field) or any other segment of data so long as it is represented by one of the filter fields. Please note that this will work even if you’re using AdWords auto tagging on, even though you haven’t done any heavy lifting to define the Campaign Term.

By the way, you will want to exclude internal traffic from many profiles. My favorite way to remove internal traffic from a profile is with an ‘Exclude all traffic from an IP address’. Make sure you use anchors at the beginning and end of the regular expression.

Google Analytics Filter: Exclude IP Address

Another good way to exclude internal traffic, especially if you don’t have a static IP address, is to use a little hack called Count Me Out. This hack uses the GA custom segment cookie to identify users.

So remember, yes, you need to exclude internal traffic, but try to take a broad view and think about segmentation when you filter your profiles.

Subscribe:

Google Analytics Short Cut

September 13, 2007 by Justin Cutroni

As some of you may have noticed, my book PDF e-book has been published! Google Analytics Short Cut hit the web on August 31 and is now available for purchase at O’Reilly’s website.

In my opinion, and I’m a bit biased after writing for all those hours, it’s a pretty good deal for $10 US. Let me tell you why…

#1 Structured Information
There’s a lot of Google Analytics information out there. We have the GA group, blogs and some books. But, in my humble opinion, the one thing that is missing is a basic manual that provides a structured description of the system’s architecture and features. This was the real driving force behind the PDF. I wanted to explain how things work so users understand the results of certain configurations.

I didn’t want to create a web analytics book. Some pretty smart people have already written wonderful books that discuss web analytics. I wanted to create a work that can help people implement different web analytics strategies using Google Analytics and I think I did that.

#2 Free Updates
O’Reilly provides free downloads of updated PDF documents that you have purchased. How cool is that! We’ve seen Google make some pretty interesting changes to the product in the last 6 months. In fact, they just updates how time-on-site is calculated yesterday. I intend to update the PDF twice a year to cover any new features or major modifications. I might update it more if Google rolls out major changes.

But there’s a caveat… O’Reilly will only update the PDF if sales are good. You know where I’m going with this one. :)

If you’re interested in learning more about GA Short Cut please visit gashortcut.com and please make sure you read the acknowledgments. If you’d like to hear what others are saying you can read the reviews on O’Reilly’s site or check the reviews on gahortcut.com (If you’re interested in writing a review please let me know. I would be honored.)

Finally, I’d like to thank all of you. Thank you for sharing your thoughts, questions and ideas with me. Thanks for adding to the discussion and helping me grow and learn. I had no idea that blogging would lead to so many opportunities. But, more importantly, I had no idea it would lead to so many new friends.

Subscribe:

Time-On-Page Goals in Google Analytics & Website Optimizer

September 5, 2007 by Justin Cutroni

Today the Website Optimizer team introduced some new features that will make Optimizer much easier to use. I’m going to defer to the guys at GrokDotCom for coverage on the new features. They got their post up pretty fast and included a snazzy interview with Tom Leung (the Website Optimizer product manager). Please take a moment and check it out.

I’d like to highlight a seemingly minor update to the WO documentation that opened my eyes. Along with the new product features, the WO team published a simple tutorial about how to track time-on-page based conversions. This method can be used to create conversions based on how much time a visitor spends on a page.

How much TIME!Why is this important? Some conversion activities have nothing to do with completing a process. Some conversions measure how engaged a visitor is with a website. While there are many ways to measure engagement, and many different opinions about what engagement is, time spent reading a certain page is one way to measure engagement.

Anyway, the method that the optimizer team published in their support doc can be used in Google Analytics to create time-on-page goals. The secret to the tracking is translating how much time a visitor spends on a page into a pageview. Remember, goal tracking in Google Analytics is based on a pageview. We need to create a pageview that indicates the visitor has been on a page for a certain amount of time.

How it Works

To translate time on page to a pageview we use a nifty JavaScript function called setTimeout(). This function will ‘do something’ after a specified interval of time. We can use setTimeout() to create a pageview after some period of time has elapsed. How do we create pageviews in GA? With urchinTracker().

Here’s the code that will create a pageview after a certain amount of time:


<script>
setTimeout('urchinTracker("/read-pages?page="+
_udl.pathname+_udl.search);', 20000);
</script>

You’ll notice that there are two parts to the setTimeout() function. They’re separated by a comma. The first is urchinTracker(). That’s what will create the pageview after a certain amount of time. The second part is the number 20000. That’s the amount of time that setTimeout() will wait before executing urchinTracker() and thus creating the pageview.

The time is in milliseconds. 1000 milliseconds equals one second. So 10000 milliseconds = 10 seconds.

Place the code, below the standard GA page tag. Once the page loads the timer will start. When the time limit is reached the urchinTracker() function will execute and a pageview will be created for the value passed to urchinTracker(). I’ve used a couple of Google Analytics variable to define the name of the pageview.

udl.pathname is the part of the URL that occurs after the domain extension (.com, .net, etc.) and before any query string parameters (which usually start with a question mark).

_udl.search is the list of query string parameters that appear after the path.

The code will create a pageview for a fictional page named ‘/read-pages’. Part of the fictional page URL will be a query parameter named ‘page’ that stores the name of the page that the visitor was on when the pageview was executed. This setup gives you a lot of flexibility when setting up the goal.

Here’s how the goal would be setup:

Goal Settings for Time on Page Goal

And here are some additional settings I’ve added to this goal:

Additional Settings for Time on Page Goal

The goal is defined as a regular expression. So any pageview that matches ‘/read-page\?page=’ will contribute to the goal total. Using this setup you can create one generic goal called ‘Read Page’ and then use the Goal Verification report to segment the conversions and identify which pages people actually read.

An Example

Let’s say we want to track how many people stay on the following page for 3 minutes:

http://www.epikone.com/blog/2007/08/29/segmenting-members-from-non-members/

First we need to translate minutes to milli seconds:

3 minutes = 180 seconds
1 second = 1000 milliseconds
3 minutes = 180000 milliseconds

Now we’re ready to add the code to the page. Remember, it must go below the standard GA page tag:


<script>
setTimeout('urchinTracker("/read-pages?page="+
_udl.pathname+_udl.search);', 180000);
</script>

After a visitor views the page for 3 minutes the code will create a pageview for:

/read-pages?page=/blog/2007/08/29/segmenting-members-from-non-members/

And a goal conversion will follow.

A Note About Website Optimizer

Obviously this technique will work for tracking conversion in Website Optimizer. The implementation is slightly different. You need to include the account number in the SetTimeout() function. The reason is that the GA code might have a different account number than the Website Optimizer.


<script>
setTimeout('_uacct="UA-XXXXXX-X";
urchinTracker("/read-pages?page="+_udl.pathname+_udl.search);',
20000);
</script>

Conclusion

I can’t believe that I didn’t think of this method before. :) Thanks WO team for posting that very cool article.

Now, what about number of number-of-visit goals or time-on-site goals? I’ve got the number of visits goal tracking figured out and I’m working on a generic time on site. Stay tuned.

Subscribe:

Tip: Make Sure Your Site Works

September 2, 2007 by Justin Cutroni

I just read a great article by Bryan Eisenderg about Conversion Rate Basics. He points out some simple things that you should do to insure your site is converting visitors. This got me thinking about an experience I had earlier this week.

On Wednesday (August 29, 2007) I received a message from NetFlix regarding their video on demand service . I’m a big fan of on demand video so I decided to click on the email and view the offer. Imagine my surprise when I was greeted with the following message on the NetFlix website:

Netflix Error Message

Now the site was not down long and this may have been an unforeseen problem. But the lesson is clear: make sure your site works. If it doesn’t you’re going to loose business.

Here’s a similar example. We started working with a client who uses their website to generate sales leads. While evaluating the website we found that their main lead generation form, if filled out incorrectly, would display a plain white screen to the visitor. No web page, no error message, no nothing. Just a plain white page.

How can you protect yourself from unexpected downtime? Try a site monitoring service. I’ve never used one but assume they all function the same way. At some given interval, say 2 minutes, the monitoring service makes a request to your website. If the web server returns an abnormal result then an alert is sent to the responsible party. The company usually charges a small monthly fee for this service. Does anyone out there have an experience with a site monitoring service they would like to share?

But what if the NetFlix issue was not unforeseen? What if the email blast was sent during the website’s scheduled maintenance period? To me, that indicates a lack of process. There should be been some type of process in place that stopped the email blast from going out while the website was down. From a web analytics standpoint, I always want to know when a client is sending out emails so I can insure that it is tagged for tracking. How about adding a step to the ‘email blast process’ to check the website status before sending out the email? I know it doesn’t seem complicated, but unless checking the website maintenance schedule is a documented step in a defined process it could go undone.

Subscribe: