In Data Studio we can use CASE statements to create our own segments, but there is also the option to use pre-existing segments that we’ve created in Google Analytics.
Creating Segments in Google Analytics
So firstly, let’s look at how segments are created in Google Analytics.
If we open up Google Analytics and navigate to Acquisition > Overview we see the option to + Add Segment.
We click that and then see the option to click + New Segment.
We then see our options for creating a new segment.
Let’s say we want to compare Users from the United States and Canada to the United Kingdom, France, Germany and Spain.
Perhaps we have some hunches about how these two groups of users might interact with the site. We want to understand if they arrive on our site differently, if they look at different content and perhaps which group is more likely to convert.
So we’ll call these two segments ‘US, CA’ and ‘DE, ES, FR, UK’.
First let’s create the ‘US, CA’ segment. So the only thing we will be basing our segment on is whether our users are in the United States or Canada.
We therefore set up our segment as follows under Advanced Conditions;
Filter (Users) include;
Country > exactly matches > United States OR
Country > exactly matches > Canada
We see that this includes nearly 18% of all our users. Click save and now let’s create the European segment.
Filter (Users) include;
Country > exactly matches > Germany OR
Country > exactly matches > Spain OR
Country > exactly matches > France OR
Country > exactly matches > United Kingdom
This segment makes up 22% of users on our site. As shown below we can take a look at them in Google Analytics.
It’s now time to compare and contrast them in Data Studio.
Adding Google Analytics segments to Data Studio
The next step is to compare and contrast our two segments in Google Data Studio.
First we add the Google Analytics data to our report.
First let’s create some charts. We’ll create a scorecard, a time series line chart, a Source/Medium table and a Country table. Our metric for all these charts will be Users.
Once we’ve created our charts, we can right click and ‘Duplicate’ them. We can then move them to the side of the original charts. This gives us two sets of identical charts to compare the two GA segments.
We know have our two sets of charts. I’ve changed the colour of the right-hand charts to red (would later change it to orange). They show exactly the same data.
Next we add in our segments. To add them go to the data tab of your chart. Then under ‘Google Analytics segments’ click ‘Add a segment’. You can then search for your segment. System segments are available as standard in GA, while custom segments are ones you create yourself. So our ‘DE, ES, FR, UK’ segment will be found under Custom segments.
We then proceed to add our custom segment to the report.
Once we’ve added it to a chart, we we will see it is listed under ‘Google Analytics segment’ in the data tab. In the example below, I’ve added the ‘US, CA’ segment to the Users scorecard. You will also noticed there is a notification saying ‘Sync enabled’. I will explain this below.
Syncing with Google Analytics
You have the option to tick to Sync with Google Analytics in your Data Studio report.
It means that if you make a change to the segment in GA, the change will be reflected in Data Studio.
According to Google Analytics support;
“Data Studio keeps the segments in your Data Studio reports synchronized with Google Analytics. This means you can update the segment definition in Analytics and see your changes reflected in your Data Studio reports.”
Blending data to compare the GA segments
One more thing we can do is to blend the data together to compare the two segments. To do this, create two new time series charts with the correct segments applied. Then select both, right click and choose ‘Blend data’.
We then have our two segments as separate metrics in a time series line chart.
Analyzing GA segments in Data Studio
Now that we’ve added both our segments we can analyze the data in the Data Studio report below.
I hope you found this article about how to compare Google Analytics segments useful.
My Other Blog Posts
If you liked this article you might like my other blog posts.