Friday, November 26, 2010

How to compare multiple segments in Google Analytics without "All Visits"

If you have used Google Analytics for very long, you probably have noticed that there are a few quirks in the system that you usually just have to deal with. It is hard to compare the features and flexibility of Google Analytics (GA) to other enterprise-level tools, especially when it is "free" to use.

I use GA at Penn State's College of Agricultural Sciences to analyze our hundreds of websites. The aggregated data over that many websites provides some really amazing trends and insights. We are even able to predict the spread of some common household pests based on some of our well ranked web pages.

30-day trend for all college websites

I use Advanced Segments in GA to filter down the traffic to specific criteria that I have defined. One example that I tried recently is to create an advanced segment called "Social Media Traffic". The segment was defined to look for referring traffic from many of the top social media websites. I then wanted to compare the social media segment to the built in segment called "Mobile traffic". I wanted to see if there was a correlation between increase refers from social media websites and the use of mobile devices.

When you go to select your advanced segments, you are presented with a menu like this:

Advanced Segments menu




Next, you would normally select your second segment like so:


You can also deselect the "All Visits" segment, but you will soon see that it will not matter. Since we want to compare social media to mobile traffic, we next want to select the mobile traffic segment.


Seem perfect, right? Well, when we click "Apply", you are presented with the following graph.

  

If you look at this graph, you will notice that there are 3 segments now selected. "All visits", "Social Media traffic", and "Mobile traffic". In this example, we really just wanted to compare two segments. It is difficult to compare these two small segments, when the "All Visits" is overwhelming the chart.

After scratching your head, you go back up to the advanced segments drop down window to find the following:


You go to deselect the "All Visits" segment and the darn thing is grayed out! You cannot deselect it, so you are stuck with always comparing multiple segments to "All Visits". If you have a lot of aggregated traffic as I do, this is very frustrating.

So what can you do about this? Deal with it? No way! Read on to for a simple solution.

If you are a web developer, then you probably use Firefox as your default browser. If you are a web developer and use Firefox, then you surely have Firebug installed. If you don't, do it now! After you have Firebug installed and understand how to use it, return back to your "3 segment paradox" issue described above. After you open up Firebug, you will have something like the following:


What you need to do next is to display the advanced segments drop down menu. With Firebug open, click the inspect tool, and mouse over the "All Visits" check box as shown below:
Click your mouse on the "All Visits" check box, and within Firebug, it should now have the HTML input box highlighted in blue. As seen below, right click on the input element and click "Delete Element". Now, with the magic of Firebug, you have removed the "All Visits" check box from the advanced segments drop down menu!

Viola! All Visits is gone!
Now, all you need to do is to apply the advanced segments, and you will finally have what you originally wanted. A comparison between two segments!

A "hidden" trend is revealed after "All Visits" is removed.
You can do this is with other advanced segments when Google tries to step in and select the "All Visits" check box for you. Check back soon for another blog on how you can use this same method to compare more than two segments at one time.

Happy analyzing!

1 comments:

Sam Fox said...

Great trick, thanks very much!

Post a Comment