In Analytics, Segmentation equals success – Justin CutroniTweet
If there is one thing that is most important and also very confusing in Google Analytics, without any doubt it’s Advanced Segments.
In this post, you will learn about the Google analytics data model and how changing the scopes ( User, session & Hits) of the segments can dramatically change the meaning of the segment and screw your analysis if you don’t pay close attention to it. We will look at lots of examples and illustrate them visually to make your understanding more concrete.
1. Google analytics Data model –
What are Users, Sessions & Hits, and How they are organized inside Google Analytics?
A. Hits –
So during your single visit to a website, a lot of hits are sent to the web analytics tool.
In the above figure, it’s the light blue boxes.
B. Sessions/visits –
A session is simply a collection of all these Hits from the same user from the start and exit of the website or leaving the website open for 29 minutes of inactivity.
In the figure, it’s the Green Boxes.
C. Users/visitors –
Users are just anonymous cookies that the analytics tools set when a person visits a website for the first time. Then this cookie or identifier persists until it expires or gets deleted.
This identifier is sent to the analytics tool with every hit of data. Then the analytics tool group these hits into sessions and finally into Users using the identifier.
Important Things to Remember –
1. The Above Google analytics data model picture.
2. Second thing to remember is that a user can have multiple sessions and each session can have multiple hits. This is what the above picture is telling.
Now, let’s see how things get messed up if we don’t understand it properly.
2. Conditions in Advanced Segments –
A. AND Conditions –
Incoming traffic segment is one of the most common yet very important segment for all of us. You want to know about all the sessions or visits where a users came from Google or Facebook or any other sources.
To create this segment you do the following –
1. First, you will click on the traffic source.
2. Then filter by Sessions at the top.
3. You will then select Source > Exactly matches > Google
If you look to the right of the above pic, you can see the summary of this segment like How many users or sessions are included in this segment and also all the conditions that you have applied.
You can see there are 9,726 users and 11,092 sessions.
This is a Session Scoped segment as I have filtered this segment by sessions.
But what If I changed it to a User scoped segment?
To do that, all I have to do is change the filter from sessions to users at the top and everything else will be the same.
But, now there are 9,726 users and 11,873 sessions. The number of users is the same as we saw earlier but the number of sessions has increased from 11,092 to 11,873.
So, What is going on here?
The reason for this is when the segment was Session Scoped, Goggle analytics is only looking for all the sessions/visits where a user came from Google. In this case, 2 sessions and 3 hits from the 1st user and one session and one hit from the 2nd user.
But when the segment is User Scoped, Google Analytics is looking for all the users who have at least one session from Google during this time frame, So it selected both the users and all of their sessions even if it isn’t from google because we are looking at the user level not based on sessions.
So, as you can see that depending upon what scope you choose in your segment, you can get a very different result. Always remember the Google analytics data model picture. It will help you to avoid common pitfalls.
Now, you can save this segment and apply to almost every report in your google analytics.
At a time, you can apply only four segments in Google Analytics.
2. Another common segment is same as before but now we want to also know about the users who also visited a particular page in the same session.
This is a session scoped segment, so Google Analytics will look for all the sessions where the medium was organic and the page title contains Accessories. So every time someone will come from organic and goes to this page, they will be included in this segment. There are 1,319 users and 1,385 sessions in this segment.
But let’s say you want to know about users who did both these two things but not necessarily in the same session. So, you might just want to turn this segment into a user scoped segment. Let’s see what happens if we do that.
Users – 1,319 and Sessions – 1,862
The number of users for this segment is the same but the number of sessions now has increased as we saw earlier.
What this segment is actually doing is it is looking for all the users where the medium was organic and the page title was Accessories simultaneously. But this is not what we are trying to do. We want to know about users who satisfied both these conditions but not necessarily in the same session.
To do that, we will add another separate filter for the second condition.
Here, I have created two separate filters for each conditions and applied the scope at the user level.
Users -1,387 and Sessions – 2,084
Now, both the users and sessions numbers has increased and the reason for this is that now we are looking for users who came from the organic medium at some point, and at some another point they went to a page containing Accessories but not necessarily in the same session. Let’s illustrate this visually.
Session scoped segment –
If we apply a session scoped filter and both these conditions happen in the same session, then the number of users and sessions will be –
Users – 2 (1st user and the 2nd one) and sessions – 2
User scoped segment –
If we apply a user scoped filter and look for both these conditions happen in the same session, then the number of users and sessions will be –
Users – 2( 1st and 2nd) and sessions – 6
User scoped but the condition not met necessarily in the same session –
Users – 3 (all the users) and sessions – 9
Let’s look at one more example to understand how session and User scoped segments get evaluated in Google analytics.
Here, we want to include all the sessions where a user visited the Nest-USA page as well as the Bags page during the same session.
Users – 180 and Sessions – 182
Now let’s see what happened if we try to change it to a user-scoped segment.
The reason for this is that when we apply a session scoped segment, Google analytics is evaluating all of the hits in a session where the user visited the Nest-usa and Bags page but when we apply a segment on the User level, Google analytics looks for individual hits where all of the conditions are true. So, in this example, there is no single hit where the page title simultaneously matches Nest-usa as well as Bags.
The reason the google team did this that sometimes we might want to know about users who viewed the Nest-usa page and bought a Nest product. If they don’t do it then a user might have seen the Nest-usa page but bought a completely different product. So, this allows us to say no I want these two things to happen in the same hit and only give me users who satisfy these conditions.
B. OR conditions –
We can also apply OR conditions in advanced segments.
This example basically says give me all the sessions where the medium was either referral or Organic or both.
Users – 13,169 and sessions – 15,804
If we look at it visually, we will have 2 users and 3 sessions.
And if we turned this into a User scoped segment, then we have –
Users – 13,169 and Sessions – 16,476
And as we saw earlier, the number of users will be the same but the number of sessions will increase because there might be some sessions which are not from either referral and organic but will be included because we are looking at a user level.
C. Exclude conditions –
Like include conditions, we can also have excluded conditions.
In this example, we are saying that exclude every session where a user saw the Nest-USA page as well as the Bags page in the same session.
Users – 16,823 and sessions – 20,973
This segment include everything that is left after throwing out all the sessions and users who saw these two pages during the same session.
D. Sequence segments –
Sequence segments are very helpful when the order of hits matters or the way it happens matters.
Suppose, you are interested to know, in a session how many users added a product to the cart, started the checkout process but didn’t complete the purchase. When you want to analyze these kinds of processes, sequence segments are best. let’s see how to do that.
Few things to notice, you can see that I have chosen a session scoped segment because I want to analyze these things to happens during a single session. Second I have chosen “Any user Interaction” at the top right. you also have an option for First user interaction(see above). First user interaction means that a user did a particular thing first before anything else happen. And between step1 and step 2, I have chosen “is followed by”, you also have an option for “Is immediately followed by” which means I want these two steps to happens immediately one after another, nothing in between them. Let’s see what am I trying to do step by step.
In step 1, I am trying to include all the sessions in which a user added a product to the cart. With “Any user interaction” I am trying to say that users come to the website via any page or channel, they browse the website, like any item, and then added it to the cart.
Before the second step, I am using ” is followed by ” because there are chances that after adding a product to the cart, the user might do a little bit of browsing or anything else. Here I am trying to be less restrictive, but it totally depends on what are you trying to do.
Then in the 3rd step I used transactions per session less than 1, which means the user did not buy the product.
So, there are 323 sessions where a user added something to the cart, started the checkout process but didn’t complete the purchase.
Many customers don’t purchase products in a single session. so, It could happen that these above events take place in multiple sessions. So if you are interested in this then you will use the user scoped segment by simply changing the sessions to the user at the top.
E. Recap ( users, sessions, and hits ) –
Let’s look at this one last time and understand how advanced segments work in google analytics to clear out any confusion between users, sessions, and hits.
Here, all of the users have purchased products worth $200. Someone spent it in a single session and someone in a multiple session. Let’s see how things will change depending upon the scope of the segment.
User scoped segment –
Here, I am saying give me all the users who spent more than or equal to $100 on my website. It will give me all the 3 users and all of their sessions and hits because it’s a user scoped segment.
Session scoped segment –
Here I am saying, give me all the sessions where a user spent more than or equal to $100.
This segment will only include user 1 and user 2 and completely ignores the 3rd user 🙂 The reason is there isn’t a single session where this user spends >= $100 even he/she spent more than this in multiple sessions. Depending upon what scope you use, you will get very different results. So, only user 1 and user 2 will be included in the segment with 1 session of user 1 and two sessions of user 2.
Hit scoped segment –
Here, I am saying give me all the sessions wherein a single hit the amount of money spent by a user is more than or equal to $100.
Which means this segment will only include the 2nd user 🙂 both the 1st and the 3rd users will be thrown out. Because these two users don’t have a session wherein a single hit they spend >= $100.
If you don’t want to make mistakes then always try to visualize this GA data model in your head while creating your segments.
If you find this article helpful then like, share and subscribe. If you have any questions then feel free to ask in the comment section below. Have a great day.