Join Corey Koberg for an in-depth discussion in this video Why you may have more users than sessions (Advanced), part of Google Analytics Tips.
- Nothing seems to strike fear at the heart of analysts quite so much as obviously wrong data, because it makes you question whether anything you're looking at is correct or if the entire data source is corrupt. To that end one of the most common questions I receive some variant where they're seeing seemingly impossible data. One example is this custom report we're going to take a look at in just a minute. In fact this is not only common, but it's the usual scenario since technically the data is actually correct. Now the idea of this report is a reasonable one. You have various pages on the site and you want to compare various metrics to see the performance of each of those pages.
The area where the wheels seem to fall off here is in the second and third columns which are the sessions and the users. Before we dive too far into this, to further illustrate why this is so jarring let's refer back to the diagram we created a few videos ago when we were looking at sessions versus user filters. In this first illustration we have a single user, myself Corey Koberg, and I had my first session May 12th, and in that session I had a series of hits, mainly page views and events. There was a second session on June 6th, that also contained several hits, three page views, and one event.
Here's a similar illustration with two users, Dave and Corey, where I have two sessions in the associated hits, and he the second user, has a single session and its associated hits. So far, so good. If we were to create a simple table here summarizing this you would see the following. For myself, I am of course one user, I have two sessions, six page views, and one event. Dave is one user, he had a single session, he had four page views, which is a hit-level metric, and two events, another hit-level metric. This totals to two users, three sessions, ten page views, and three events.
You're probably quite bored at this point because this is all very straight forward. If we move back to our actual live data you may see where things get a little strange. Look at these first few lines. We know that a single user can have multiple sessions. How can we have scenario where we have more users than sessions? After all, based on what we just went through, doesn't a user have to have at least one session? We saw that hits live inside the sessions, so how could this page have a user, but apparently not a session for each one of those users? This is exactly where the doubt starts to creep in, because if we look at the second line we see 18,313 users but only 17,920 sessions.
How could that be? The answer, as we've seen before, is making sure we understand exactly how Google calculates these metrics. So let's break this down so we can make some sense of it. We have our two standard users here, Alice and Bob, each have a single session. Alice's visit starts on the home page, and then goes to the AboutUs page, and finally ends back on the home page. Bob's visit starts on the privacy page, but then visits the same AboutUs page that Alice had. If you'll recall for that custom report we were looking at these metrics for each of these pages.
Before we take a look at how those metrics would stack up in this scenario we need to point out the key information here about why things look so strange. First we're doing something a little odd right off the bat without even realizing it. We are calculating session-level metrics on a hit-level dimension. Said another way we're looking at hit-level dimension of page with session-level metrics. The reason why that causes odd behavior is because this metric sessions is just an incremental counter. It just goes up once for each session that a user has.
Logically, that increment happens on the very first hit of the session. Imagine as the new page view comes in from a brand new session, the counter gets incremented. That is the only time it's going to get incremented, If you aren't looking at that very page view that starts that session, that increment won't be associated with the page that you're examining. In other words it's only valid for landing pages. With that in mind let's calculate these various metrics. For the first page here, the home page, we have two page views.
User Alice had this twice in her session, the first and the last. For the AboutUs page it did appear twice in two different sessions. For the privacy page that only appeared once, so we have a total of five page views. For sessions we're gonna take a look again at that first one. The home page was one of these entrances, so we are gonna increment once for the home page. The AboutUs was a second page, it was never an entrance, so we do not increment for the AboutUs page. The privacy page was the first entrance for user Bob, so that's going to get incremented.
We have a total of two in the sessions counter. For a unique page views, remember this is going to be the first time a page view came in a session, it's only going to happen once per session. In the case of user Alice we have the home page twice in a single session, so it's only going to get counted once. The AboutUs is also going to be there twice, but it's going to be once in each session, so it is going to get counted twice. The privacy only appears once in the second session, so it's going to be counted once. We have a total here of four unique page views.
The next entrances is going to tell us when this particular page that we're looking at was the landing page. For the home page, it was a landing page for Alice, so we're going to have one entrance there. AboutUs was never the landing page, so it's going to be a zero. Privacy was the landing page for Bob, so it's going to be a one. We have a total of two entrances. What you'll probably notice here is that sessions and entrances were calculated almost exactly the same, so we'll touch on that in a second. As far as users go, this is where it's different from the sessions counter. This is not a counter, this is going to be how many users we have associated.
Each page is going to be associated with a user. For the home page it's associated with user Alice, that's one. The AboutUs page was associated with both users, that's two. Privacy is going to be one. But this is not a simple addition here. We're not just gonna add up all these users of course. We know there is a total of two users, Alice and Bob. That's exactly what we're going to see reflected here. Going back to this idea of sessions and entrances, because the page-level calculation for entrances, where that page was a landing page, is essentially the same as the session's metric when we're looking at a hit-level dimension, you can consider these two essentially the same thing.
Taking all this new information, let's go back to our original custom report and see if this all makes sense. Again armed with that knowledge that if we're looking for the number of visits that included this page view, then the unique page views is our metric. And we do see here is that it's a little bit shy of the overall page views. Meaning that the small fraction included the page twice in the session, which makes sense, that happens. And we see here that for 542,000 page views we do have 404,000 unique page views, so again those metrics make fine sense. Indeed entrances is almost an exact match for sessions.
For entrances we have 87,174. We have 87,178 sessions, so out of 87,000 only a four difference. We're gonna call that good enough. There is a reason why those two might be a little bit different, we'll touch on that in just a second. For the most part this is starting to make a lot more sense. We're understanding now why these numbers look the way they do. So in summary, first and foremost always be careful and mindful when you're mixing and matching hit-level dimensions and session-level metrics.
Second thing is that the session metric is not the same thing as the overall session. It's just a counter that gets incremented on the first hit. So while all hits are associated with a session, that counter is going to be just on the first one. 99 times out of 100 what you're really looking for in those cases is the unique page views metric. When we're talking about hit-level dimensions, sessions sessions and entrances are usually synonymous for most sites. There is a tiny difference between entrances and sessions, because sessions will include cases where the first hit is an event instead of a page view.
That is usually minor for most sites, as most sites don't start with an event, but rather a page view or even a screen view in the mobile app case. Hopefully this clears things up a bit for you, and you can go back to trusting your data.