What are Users and Sessions in Google Analytics?
I do Google Analytics training sessions very often, and often for non-analysts. One of the questions that pop up most often is something that might seem basic for full time web analysts. Namely, just what are Users and Sessions? And what is the difference between Users and Sessions in Google Analytics? What do those metrics mean and how do Google Analytics track and count Users and Sessions?
Many people think Users are the same thing as people. Which - at its core - is wrong. Sessions are more easily understood. But the relationship between the two seems to be difficult to grasp for many. People who’ve been working with ecommerce for years also wonders whatever happened to good old metrics such as Unique Visitors and Visits. Not that they understand those two metrics any better.
So, in this post, I want to share the explanation I usually give in my training sessions and workshops. If you’re an analyst or consultant yourself, I hope this will make it easier for you to explain the whole Users vs. Sessions thingy to your colleagues. And if you work in Sales or Marketing and don’t consider yourself a Google Analytics expert, then I hope you’ll learn the definitions and differences here.
Users are not people
Well, from a User Experience perspective, users are indeed people. But in the world of web analytics, users are not people (yet - I’ll get back to that). They’re cookies. So before we can understand the User metric, we need to understand cookies.
Cookies are literally speaking very small plain text files. They are essential for a lot of things going on online. For example, they make sure that you can log in on websites. And that you stay logged in while browsing said website. They make sure you can select a language version of a website and see the same language on your next visit. And they also enable companies to stalk you with banner ads for that weekend trip you accidentally saw on a travel site three weeks ago.
In short, cookies remember stuff about your actions on a given website. The website then saves that “stuff” in a text file on your computer. And next time you visit a website, that website can open up the cookie and read and apply the information that was originally stored. (websites can only read cookies that they themselves created in the first place). You can read more about cookies here.
Cookies in Google Analytics
Google Analytics also uses cookies. That’s how Google Analytics is able to differentiate between New Users and Returning Users. Returning Users being just that: Users who’ve visited your website more than once within a given date range. The first time you visit a website with Google Analytics, Analytics assigns a unique id (randomly generated) to you. This is called the Client ID, and it’s stored in a cookie.
Now, it’s not called a Client ID because you’re a client. Rather, “Client” is something programmers often call that piece of software that executes all that behind-the-scene stuff you never see on a website. More precisely, it’s your browser. Yes, the Client ID is basically a unique identifier for your browser. Which leads to an important distinction: Cookies are not and can not be shared by different browsers.
So if I visit your website with my Chrome browser, then my Chrome browser receives a Google Analytics cookie with a Client ID. If I then open your website with my Firefox browser on the same computer, I get a new Google Analytics cookie with a new Client ID. This also means, that I - as a person - suddenly have two Client IDs. In the eyes of Google Analytics, I’m therefore two users.
As such, the first important thing to understand about Users, is that Users are not people. Users are browsers. So if one person visits your website using a browser on a home PC, another browser on a smartphone, and a third browser on a computer in a library, Google Analytics considers that one person as three users.
What is a session then?
Now that you know that a user is a browser, we just need to know what a session means. Google Analytics records a session every time a user visits your website. So, the session begins the instant Google Analytics detects the first hit (usually a pageview).
Analytics also makes sure to keep the session ‘alive’ as long as the user is active on the website; which means that the session encompasses the entire string of interactions, the user carries out. That first pageview is sometimes followed by a second pageview, then an event, then another pageview and then a transaction. All of these interactions are hits that form the session.
Also, a new session starts if the user returns, say, the next day. So one user can start multiple sessions. But this begs the question: How do Google Analytics know when to start and end a session?
Well, the start of a session is easy: The session begins with the first hit (i.e. a pageview when your Analytics configuration works). With that first hit, Google Analytics presses the Start button on a stop watch. Now, if the user then does nothing, Google Analytics will automatically end the session when the stop watch reaches 30 minutes by default. But if the user navigates to a second page, Analytics resets the stop watch and the 30 minute timer starts over.
This also means, that a user can start two sessions - even if only one session is ‘supposed’ to be recorded. Let’s say I enter your website and start playing one of your videos. The video is 31 minutes long, and when it ends I navigate to one of your other pages. In this case, my Analytics session has already expired and my second pageview actually triggers a new session.
In other words, a session is a series of interactions where at least 30 minutes has passed from the last interaction. Now, there are several other ways sessions begin, but I won’t get into those cases in this post (write a comment if you’re curious).
How users can become people
Remember how users are not people, but browsers? Well, it is actually possible to equate those two things (users and people). At least to some extent. The answer lies within User ID tracking.
By default, the Client ID is the only thing that can ‘assign’ multiple, different sessions to the same user (or browser). This presents a problem, since Google Analytics then labels some people as multiple users. With the User ID feature in Google Analytics, you actively enrich the Client ID with a unique User ID.
This is possible if you have a website where people login. Because when people login, you can identify them with a User ID (which usually resides in your website database). By attaching this User ID to the Client ID, you also have a way to ‘assign’ different Client IDs to the same user. So even if users browse your website with different devices and/or different browsers, you’re actually able to stitch together those fragmented Client IDs and sessions that occur different places!
Users and Sessions in Google Analytics explained!
So, in short:
- A session is a visit to your website encompassing a series of interactions (pageviews, events, transactions) within that visit
- A user is basically a browser, which people use to start sessions on your website
- A user can become a person if you enrich your Google Analytics data with a User ID
And that’s it! Well, it’s the basic stuff at least.