Segmentation Options in Google Analytics

As web analysts we live and die by segmentation. Without the ability to segment traffic we can not isolate which segments are producing and which need improvement.

Google Analytics offers many different ways to segment data. Each has pros and cons but there is always a way to get the data you need…. well, almost always.

There are 6 different ways to segment data in Google Analytics:

1. Using certain reports
2. Dimension drop down
3. Report filters
4. Advanced segmentation
5. Custom reports
6. Profile filters

Bet you didn’t think there were SIX ways to segment data. :)

Using Certain Reports

Ok, you may think this form of segmentation is lame, but it’s not!

Many reports in Google Analytics are segmented by some default piece of information. There’s nothing for you to do.

For example, the Browsers report segments your data based on the different web browsers that visitors use to access your site. Google Analytics automatically identifies this information when collecting visitor data.

Google Analytics Browsers Report

Other segments that are automatically include in Google Analytics include:

* Visitor type (new and returning)
* Geographic information
* Operating system (and many other “nerd” segments)

Marketing segments are not AUTOMATICALLY segmented. You need to configure Google Analytics to track campaigns (i.e. link tagging) in order to get correct traffic source segmentation.

Pros:
* Easy

Cons:
* You better make sure you’ve got your campaigns tagged correctly ;)

Dimension Drop Down

Many reports have a dimension drop down that allows for segmentation right in the report. This is a handy way to quickly drill down into a piece of data.

For example, let’s say I want to see the most popular landing pages in a particular state. I can navigate to the state in the Visitors > Map Overlay > Regions report, click on the state I’m interested in, and then choose Landing Page from the Dimension drop down.

Google Analytics Dimension Drop Down

You can see in the image above that you can segment based on campaign information, some technical information and some visitor information (visitor type, language).

Overall, this is a good way to go when you’re drilling down and want to segment a single data point by some dimension.

Pros:
* Quick for one-off segmentation

Cons:
* Can trigger sampling
* Limited number of dimensions and no metrics
* A pain if you need to segment a lot of things, like top landing pages for every US state

Report Filters

Bet you don’t think of filtering as segmenting, but it is!

Google Analytics report filter

Any report displaying tabular data has a filter tool at the bottom of the data. This let’s you quickly view data that matches, or does not match, some condition. The condition is the pattern, or regular expression, that you enter into the filter. Using a regular expression you can add lists to the filter.

Here’s an example. Suppose I want to quickly view traffic coming from the Pacific sales region. I can apply the following filter to the Visitors > Map Overlay > Regions report:

California|Oregon|Washington

[The above is a regular expression matching California OR Oregon OR Washington]

A filter Map Overlay report in Google Analytics

Notice that the Scorecard (the top row of data in the table) indicates how our segment, i.e. the data that matches our filter, compares to the overall site? We can now compare the Pacific sales region to the entire site.

And here’s a neat trick, if you add the filtered report to your dashboard the filter will persist in your dashboard widget. I call it a sticky filter.

Pros:
* Quick and relatively easy
* Can be applied to historical data
* Will not trigger sampling

Cons:
* Restricted to one report and the data in that report
* You should know some basic regular expressions
* Can not be shared easily

Advanced Segments

There has been a lot of conversation over the last few months about Advanced segments and rightly so. This analysis tool is really powerful and let’s you slice the data many different ways using different dimensions and metrics. Want to see all visits that generated more than $100, coming from paid search and occurring after 8 AM? No problem with an advanced segment.

An Advanced Segment in Google Analytics

But there are some downsides. First, sampling. Because Advanced segments re-process data in real time there is a sampling algorithm applied to minimize the load on Google’s servers.

You can’t segment more than 200k visits. If sampling is applied you’ll see a confidence interval next to your data.

Sampling accuracy in Google Analytics

Again, the problem is that small segments of data will be really inaccurate when the sampling algorithm is applied. There is no way to disable sampling.

The most common ways to get around sampling are segmenting using profile filters or potentially a report filter. It really depends on the exact situation.

The second issue is that not all reports can be segmented. Due to the segmentation technology certain reports can not be segmented, like the Absolute Unique Visitors report and the Funnel visualization report. Those reports can only be segmented with profile filter (see below).

Pros:
* Can be applied to historical data
* LOTS of flexibility, can segment based on a huge number of dimensions and metrics using different combination of both

Cons:
* Sampling will be applied if trying to segment more than 200,000 visits
* Not all reports can be segmented
* Specific to your username, can not be shared with other users

Custom Reports

Another beta feature that can be used for segmentation is the Custom Reporting tool. This tool is more than just pretty reports. It allows you to create 5 levels of segmentation in a report.

In a previous post I talked about segmenting campaigns by time of day to better understand day parting.

We could take that example one step further by adding geographic region to the report. The result would be a report that has Campaigns data that could be segmented by time of day and then by geographic location.

Multiple levels of segmentation in a GA Custom Report

The problem is that not all dimensions can be used together. The reason is that only certain metrics are related in the Google Analytics data architecture. You can find a complete list of combinations in the GA support docs.

Pros:
* 5 levels of segmentation
* Advanced segments can be applied to a custom report
* Can be shared using automated email feature

Cons:
* Can only segment using dimensions, not metrics
* Limited number of dimension combinations
* Can only drill into one data point at a time

Filtered Profiles

Filtered profiles are the nuclear bomb of segmentation. They are permanent, segment every report in a profile, and can easily be shared.

In case you’re not familiar with filtered profiles, you can include and exclude data from a profile using a filter. Google applies the filter during data processing, thus segmenting the data.

Google Analytics profile flters

Once the data has been processed it can never be changed. This means that you can filter historical data AND if you mess up the configuration of a filter you could have really crappy data.

Another issue with filtered profiles is not all data can be filtered. For example, transactional data is different than pageview data. This can cause some funky information in campaign reports and commerce reports.

If you need to filer pageview data then you’ll need to filter your commerce data with different include or exclude filters. Also note that Event data can not be filtered.

But, on the up side, you can use filters to segment things like Absolute Unique Visitors and the Funnel Visualization report. Neither can be done with an Advanced Segment.

Absolute Unique Visitors in Google Analytics

Pros:
* Segmentation of every report in Google Analytics
* Can control access by assigning users to filtered profiles

Cons:
* Only effective from date of implementation forward
* Limited number of dimensions
* Issues with filtering other types of data, like events and transactions

I hope this inspired you to come implement different segments using different techniques. As I said in the beginning, there are a lot of ways to slice data in Google Analytics. Find the technique to suit your needs and start segmenting!

Segmenting Members from Non-Members

Do you run a subscription based website? You know the type of site: customers pay you a monthly fee and you give them access to valuable content. I’ve worked with a number of clients with this business model and have noticed that many make a consistent mistake when setting up their analytics package: they fail to segment people who subscribe to the website (i.e. members) from those who do not.

Why is this so important? Here’s an example. The following image shows some real data that is not segmented other than the removal of internal employees:

Non-Segmented data

Now, here are the same metrics with members removed:

Segmented Metrics

Big difference, huh? Just image how this changes all those metrics that are calculated using Visits, like conversion rate, abandonment rate, etc.!

It doesn’t matter what analytics tool you use. If your website has some type of member’s area you need to segment out members to get an accurate view of your website performance and online marketing activities.

The Google Analytics Way

If you’re using Google Analytics the implementation is simple. Use GA’s custom segmentation feature to identify and segment members. Remember, the custom segmentation features uses a JavaScript function, __utmSetVar(), to set a cookie, named __utmv, on the visitor’s machine. The cookie is a persistent cookie and lasts for 6 months. You need to call __utmSetVar() when a member identifies herself. You can put it on a ‘thanks for logging in’. Here’s a perfectly good implementation of the code:

<script type="text/javascript">
__utmSetVar('member');
</script>

Remember, the above code snippet should appear AFTER the standard Google Analytics tracking code. The reason is that the __utmSetVar() function is in the urchin.js file. So if you try to call __utmSetVar() before the urchin.js is loaded by the browser then the visitor will receive an error.

Once the cookie has been set on the visitor’s machine you can use the custom segment value to exclude them from a profile. The exclude filter would look something like this:

GA Filter to exclude members

Any profile that has this filter will only show data for those visitors that are not members thus providing a more accurate view of how effective the website is at converting visitors.

And let’s not forget about the members. You can create a profile that only includes members (the filter settings are almost identical to the filter above, just change the filter type from ‘exclude’ to ‘include’). By creating a profile specifically for members you can focus on their usage of the member’s area. For example, the Top Content report will identify the content that they find most engaging. You could also use some of the loyalty reports to see how often they use the website.

Tip: Tracking Different Subscription Levels

If your membership model has various level, like Gold, Silver and Bronze, you can include this information in the custom segment value. This allows for a more detailed analysis of each membership level. Just modify the value you pass to the __utmSetVar() function. For example:

<script type="text/javascript">
__utmSetVar('member-gold');
</script>

or

<script type="text/javascript">
__utmSetVar('member-silver');
</script>

or

<script type="text/javascript">
__utmSetVar('member-bronze');
</script>

After the custom segment cookie has been set you can create different profiles for each subscription level. Use the filter shown above, just change the value for Filter Field to match one of the values in the code above. Then you can use the profiles to analyze the member data and observe their habits.

Google Analytics Cross Segmentation: Something You Should Know

Google Analytics has a great feature called Cross Segmentation. Using this feature you can ‘drill down’ into your data to gain more insight. However, there is one thing that all GA users should know. Sometimes cross segmenting data does not produce the desired result.

Example

I’m a big fan of bounce rate. I think it’s a vital metric that explains a lot about the online sales channel. One things I like to do is measure the bounce rate for marketing campaigns. Using bounce rate I can tell if the marketing message that drove a visitor to the site matches the message shown to the visitor when they land on the site. Nothing revolutionary here…

I start with the Content Optimization > Navigational Analysis > Entrance Bounce Rate report. Here it is in all it’s glory:

20070307-entrance-bounce-rate.jpg

To get the data I want, the bounce rate for a specific page coming from a specific source, I need to cross segment the above report. Usually there is a special landing page (or multiple landing pages) for the campaign, but in this case we’ll look at /blog/index.php. Cross segmenting row 1 in the above report yields:

Boune Rate: Cross Segmented

See how the report columns have changed? We can no longer see the bounce rate. We only see the visits, pageviews, conversion rate and revenue per visit. Honestly, I don’t need that data, I really need to know the bounce rate for each source. Unfortunately I can’t get that data using the cross segmentation feature.

Another Example

Here’s the Marketing Optimization > Visitor Segment Performance > Referring Source report.

20070307-ref-source-cross-segmented.jpg
** Please Note: I initially posed the wrong image above. The image should contain referrals from Web Analytics Demystified. If it shows data from StumbleUpon then you may be viewing a cached image. Sorry. Now, back to our story. **
Thanks Eric for all the traffic :) Let’s cross segment row #1 by ‘Content’ and see what happens:

Referring Source: Cross Segmented

You may think that we’re segmenting by the content on my site, but we’re not. This isn’t the same content from the ‘Top Content’ report. What we see here are the pages on Eric’s site where people clicked on links to my site. How can I be sure? All the pages on my site start with ‘/blog/’.

So why is this happening? It’s just the way that GA is storing data. It’s not a bug, it’s just the way that GA works. Don’t worry, there is a work around :)

The Solution

The solution comes down to two things: planning and knowledge. Know the exact metrics you need for your analysis and make sure Google Analytics can deliver them. If you can not cross segment a report to produce the desired data, then try creating an additional profile (using filters).

Here’s how I get around the bounce rate issue above. I use a filtered profile to generate the bounce rate. I create a new profile and apply an include filter based on the campaign, medium or source, that I want to analyze. When the filter is applied to the profile then all the reports in that profile will be specific to the campaign, medium or source, specified in the filter. Obviously this is practically impossible if you are doing an analysis on the fly, or if you need to filter on a piece of data that is unknown when you set up GA.

As a rule, I always create specific profiles for major marketing campaigns. Here’s an example of the filter I might use:

Campaign Name Filter

The above filter only includes data coming from a single campaign named ‘Important-Campaign’. That means that the the data in the Entrance Bounce Rates report is only for the ‘Important-Campaign’. I’m essentially cross segmenting when Google Analytics processes the profile data.

Conclusion

I truly believe that GA can provide most of the metrics you will need for a thorough analysis. However, you must plan ahead. As the above example shows there are some anomolies, but they can be mitigated with a logical plan for analysis.

Custom Segmentation with Google Analytics

Last week wrote a piece about using custom segments to exclude yourself from Google Analytics tracking. I didn’t stop to think that some folks may not know what custom segmentation is and how it is implemented with Google Analytics. So today I’ll cover how to setup and use custom segmentation with Google Analytics.

Segmentation of data involves slicing the data based on some visitor characteristic. A very common data segment is new and returning visitors. This means that we can look at the website traffic and identify what portion is generated from new visitors, what portion is generated from returning visitors and what those groups did while on the site. Google Analytics has a number of pre-defined segments that you can find in the Marketing Optimization > Visitor Segment Performance reports.

In addition to these standard segments, you can define your own custom segment. This means you can divide your traffic into various groups, as defined by you, and then observe how those groups interact with your marketing activities and your website.

If you need more information about segmentation, or why you should do it, you can or you can read an article on ClickZ. There’s a bunch of them.

So, how do we add a visitor to a custom segment with Google Analytics? We use a JavaScript function to set a special cookie on their machine. The function is named __utmSetVar(’v’) and the cookie is named __utmv. We can call this function any where JavaScript can be called. When you use this function replace ‘v’ with some value. This is the value that will be stored in the cookie and will be visible in your reports. Here’s an example.

Let’s say we have a contact form on our site and we ask the visitor to specify their gender. There is a drop down box with the different responses. We can call the the __utmSetVar() function when the value in the drop down box changes. This will set the user-chosen value as a custom segment. After the segment has been set all of the visitor’s activites will be ‘bucketed’ into that segment.

User-Defined ReportThere are a number of ways to view how your custom segments perform. The easiest way is using the Marketing Optimization > Visitor Segment Performace > User-Defined report. This shows the visits, average page views per visit, and goal conversion rate for your custom segments.

Cross SegmentationYou can also cross segment many Google Analytics reports based on your custom segemtns. To do this click on the red chevron at the left side of a report (like the Top Content report). Then choose Cross Segment Performance and User Defined. GA will segment that line item based on your custom segments.

There is one major limitation to the Cross Segmentation functionality. You can only set one custom segment cookie at a time, therefore you can only set one custom segment, per visitor, at a time. Luckily this is pretty easy to get around. Recently, I wanted to track the conversion rate for certain genders and age groups. So I wrote some custom JavaScript that takes the gender data and age data from a form, combines it into a single string, and then sets the custom segment cookie. When the __utmSetVar() function is called it looks like this:
__utmSetVar('male:25-35')
‘male:25-35′ would be the value stored for a ‘male’ in the age group of ’25 to 35′. This value dynamically changes based on the data the user enters into the form.

That’s about it. Questions? Comments? Just want to say hi? Leave a comment below.