New to cohorts? Check out the Introduction to Cohort Analysis for Startups.
Clearly cohort analysis is a great tool to track retention and user engagement but how do you set up your blog, game or web service to track cohort groups? Google Analytics doesn’t support cohort tracking as a standard feature. The service primarily targets traditional site navigation metrics such as visits, pageviews, traffic sources and bounce rate. In the past, most companies relied on in-house solutions to get visitor-level data – and many still do. But for those unable or unwilling to create a custom analytics application for their product there haven’t been a lot of alternatives.
Appropriately, in the last few years, a new breed of analytics services has emerged which focuses more on user engagement metrics. A few of the more popular options include Mixpanel, KISSmetrics and Kontagent – all of which include event tracking, cohort metrics, per-user funnels, real-time updates, etc.
Why Google Analytics?
Considering there are services designed specifically for user engagement tracking and customer cohort analysis, it may seem a little odd that we’re going to focus on the one that isn’t. As it turns out, there are good reasons to consider Google Analytics for cohort analysis. In fact, a strong set of standard features combined with a number of new additions makes it a rather strong competitor to the new services.
Why Google Analytics may not be as bad as you think:
|Unique visitors||Last year Google made a quiet but important update making the detailed analysis of unique visitors considerably more viable.|
|Events||Google Analytics has had a competent event tracking system for several years now. A recent update allows you to use events to track goal completion.|
|Persistent user tracking||This is critical for following cohorts. While the implementation is weak, Google Analytics does support cookie data storage.|
|Data timeliness||Standard report data has become increasingly timely (often delayed by less than an hour) and they now offer a real-time user visit monitor.|
|Breadth of features||Google Analytics is rapidly morphing into a Swiss Army knife of functionality, covering everything from social media tracking to website speed optimization. This level of integration isn’t available in the other options and keeps the number of tools you need to integrate and understand to a minimum.|
|Familiarity||Everyone and their dog uses this tool so you’re probably already familiar with it; it’s relatively simple to use and available everywhere.|
|Free||This is especially important if you’re a startup. The other options can get pricey, depending on your requirements.|
For only $150,000 annually you can sign up for Google Analytics Premium which gives you 50 custom variables to play with. There have been rumors of an increase to the 5 slot limit for regular accounts for ages.
For cohort analysis, the most relevant of the above features is Google Analytics’ support for persistent user tracking. The most common and accepted way to track users as they navigate your product is to record tracking data in site cookies. You access Google Analytics cookies through a “custom variables” abstraction. Unfortunately, it’s remarkably constrained, using an awkward model where page, session and visitor-scoped custom variables are shared across only 5 “slots”. In the next section we’ll use these slots to record cohort visits.
Let’s remind ourselves what we’re trying to do. Our goal is to use the abstraction provided by Google Analytics’ five custom variables to stamp cohort-specific values in each user’s tracking cookie so that we can see, over a period of time, how well they achieve desirable business goals compared to other user groups.
Here are the steps:
Google Analytics is primarily designed around the notion of visit (not visitor) tracking. The Advanced Segments function in Google Analytics allows you to isolate visits that meet a configurable set of conditions. While the ability to slice and dice your data in almost any fashion is powerful, you won’t immediately be able to see the number of visitors that match your criteria.
- Decide what to track. Define what you need to store (dates, goals, etc.) and how you will partition it in the available slots.
- Write the data. Write the appropriate data to their cookies when visitors arrive.
- Segment the results. For each cohort grouping that you want to track, create an advanced segment in Google Analytics.
- Analyze with reports. Create cohort reports for retention or goal analysis.