Data Analysis

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.



10 thoughts on “What are Users and Sessions in Google Analytics?

  1. Hi Phillip,

    This article was really well written and one of the better ones I’ve read on the topic. I’m interested in knowing more about how sessions begin, as you alluded too, so I followed your directive to leave a comment.

    Thank you very much and I look forward to learning more from you on the topic

    1. Hi Adhlere,

      Thanks, I appreciate the feedback!

      A session begins when the first hit is sent to Analytics. Usually, when entering a website with Google Analytics installed, the first hit is a pageview. If the next hit is within the 30 minute frame, this hit will “belong” to this session.

      If, on the other hand, more than 30 minutes pass since the last hit, a new session begins with the next hit.

      I hope this makes sense.


  2. Hi Phillip
    Excellent and very easy to follow. I have shared your article with my team.
    Could you please tell me if a new GA client cookie would get triggered if 1) the GA user uses a new version of the same browser such as Chrome? I thought a new cookie would get triggered but I have seen cases where the Unique User ID doesn’t change despite GA listing different Chrome version 2) if the “person” uses a portal such as Citrix which I’ve been told creates a new profile at each login and triggers a new GA client ID.
    Thank you very much in anticipation!

    1. Hi Emmanuelle,

      Thanks for the feedback! As to your questions:

      1) Usually, a browser upgrade will not delete or reset cookies. So if running one version of Chrome, cookies are usually persisted when upgrading Chrome. This means that the GA cookie continues to exist even after the upgrade, and GA will be able to recognize that cookie.

      2) I’m not sure what you mean by “portal”. If you’re talking about remote desktop where you in fact use another computer through e.g. Citrix, then any visits to a site from there will use a separate cookie (set on the remote computer) from the computer being used.

      I hope that makes sense :)

      1. Thank you Phillip. This is extremely useful and makes sense. On Citrix, then I assume that the new cookie is valid for one session, or at best one day, and would not re-appear again on another day. Thanks!

  3. Hi Philip,

    Just wanted to understand, if a user comes on a website and is active say for 45 mins by clicking on various links or pages so would that be counted as 1 or 2 sessions?
    Normally a session expired post 30 mins of last interaction but what if the user is totally active on the site for more than 30 mins?

  4. How about multiple sessions in multiple window/tabs of same browser ?

    Say I have two campaigns, I don’t use user id and only default client id setup exist, then it will create two session. now any activity in tab 1 (campaign 1) will break session of tab 2(campaign 2). What would you suggest for that situation to persist session without break (in simple terms session will only close if I exit from website or 30 min expires)?

    1. Hi Sumit,
      Browsing the website in different tabs is no different (in the eyes of GA) than browsing it in one tab. What matters is the order of the hits sent to GA. Campaign parameters (e.g UTM parameters) will always override previous Campaigns. You can’t change that, that’s just how GA works.

      1. Appreciate quick update ! That makes sense ( from GA perspective). Is there a way we can run two different session simultaneously for the same website(say for website ABC user opens campaign 1 reference from fb and campaign 2 reference from linkedin) ?

Leave a Reply

Your email address will not be published. Required fields are marked *