Google Analyitcs segments are a fantastic way to organize the results of an analysis. There are, however, a few limitations of using segments in GA:
- They cause reports to become sampled after 500,000 sessions (or 100M with GA360)
- Only 4 segments can be compared at one time
- Segments are saved under your Google account which makes sharing them a pain
- When comparing segments, it’s hard to tell how much they overlap
All of these limitations can be resolved by bringing your Google Analytics data into R with the googleAnalyticsR library, but this post will focus on #4 above: Understanding segment overlap. The code generating this blog post can be found here.
The CausalImpact R library measures the effects of an event on a response variable when establishing a traditional control group through a randomized trial is not a viable option. It does this by establishing a ‘synthetic control’ which serves as a baseline under which the actual data is compared.
The question came up recently within the Digital Analytics Association member forum regarding whether one could interchange the Google Analytic’s “Unique Views” metric found when viewing a Content Group and the “Sessions” metric found when using Advanced Segments. They were asking because they had a preference for using Advanced Segments, but wanted to make sure they were comparing apples to apples. The question boiled down to this:
If I create a content group defined as “contains /blog/” and an advanced segment defined as “sessions that viewed pages which contain /blog/”, will the “Unique Views” metric for the content group be the same as the “Sessions” metric for the advanced segment?
The answer is yes. Let’s look into why.
When you create a content group and view the “All Pages” report with your content group selected, you’ll notice that the first 2 metrics displayed are “Pageviews” and “Unique Views”. Don’t be thrown off here. You may be familiar with “Pageviews”, but “Unique Views” is not “Unique Pageviews”. It’s a metric only available when viewing content groups.