Friday, March 26, 2010

Creating the Right Segments

Creating segments are an integral part of web analytics, whether it is segments based on pages viewed, or segments based on geographical locations or based on certain events. However the most important concept around creating segments that give you accurate data for your analysis is the concept of containers.

So what are containers??

Well every dimension, metric and segments in web analytics tools are created based on the following three fundamental containers:

1.    Page View Container
2.    Session Container.
3.    Visitor Container.

Now to define these containers in theory can be a bit difficult. So I will give some examples which will make it very easy to understand and thus make it easy for you to create segments, custom dimensions and metric.

The most important thing to remember about these containers is the hierarchical structure that they follow.  Basically all page views are part of one session or the other and every session is part of a visitor. Confusing? Look at the diagram below…it will make things easier to visualize:

What you see is a Venn diagram. Basically all the green circles are the page views occurring within a session (red circles) which in turn are associated with a visitor.
So a page view is a subset of a session which in turn is a subset of a visitor.
All dimensions and metric that you find in a typical web analytics tool (like Omniture SiteCatalyst, Omniture Insight, Google Analytics, etc) use this concept.
Now when creating custom segments for our analysis we are going to use this concept. Let’s get down to business.

Say you are analyzing an online retail store and want to create some segments.  We have 3 visitors (A, B & C) who come to this site. The sessions associated with their visits and the pages that they visit during each of these sessions are shown in the figures.

Now you create a segment of Books (Books page view) at the page view container level.
Then the page views (metric) corresponding to this segment will be 5, whereas the corresponding sessions will be 4. The number of visitors for this segment will be 3.

Now we again create this segment, but this time at the session container level.

Page views in this case will be 12 (why?)
Sessions will be 4 (as before)
Visitors will be 3 (as before)

Why are there are 12 page views since the figure clearly shows that we have 3 visitors with a total of 5 page views of the Books page? Well when we are creating the segment at the sessions container level and measuring page views for this segment what we are calculating is the page views of all pages in all the sessions meeting our criteria. So in this segment we have selected sessions in which the Books page was viewed. Clearly there are 4 such sessions and since each such session had 3 page views (not only the Books pages, but any page within that session) , there are in total 12 page views.

Let’s continue with our experiment and create this same segment at the Visitor container level. Let’s look at the metrics now:

Page views in this case will be 27(????)
Sessions will be 9 (???)
Visitors will be 3 (as before)

I believe most of you would have figured out why the metric values have changed again and so drastically. Well in case you haven’t figured out, this is why:

When you are creating the segment at the visitor container level what you are effectively doing is selecting all visitors meeting the particular criteria (again Books page view). So all the 3 visitors A,B and C has met this criteria. Now when we calculate the page views for this segment, we consider all the page views that has happened corresponding to the visitors meeting our criteria. Since there are 27 page views in all, that will be the page views at the visitor level segment.

Again when considering the sessions for this segment, we are considering all sessions of visitor meeting our criteria. Finally the visitor metric will give us the same value 3 and I hope you know why by this time.

Well this was really a very simple example to explain what difference in numbers can be caused by the container you choose while creating a segment. Real life segmentation work can involve a lot of criteria which needs to be considered carefully before choosing the container level.

P.S: Different Web Analytics Tool provides different ways to create segments. For example Omniture SiteCatalyst provides tools like Data Warehouse, ASI slots , Omniture Insight provide visualization tools and Google Analytics provide Advanced Segments.


  1. I’m eager to find the valuable information and for me this is the right place to get the good stuff. Entrepreneur

  2. I thought this was an excellent as well as useful document to read. We've truly enjoyed doing this very cool facts.Nimble Messaging Services