How Do Sessions Work in Google Analytics? — Best of Whiteboard Friday
Posted by Tom.Capper
Google Analytics data is used to support tons of important work, ranging from our everyday marketing reporting, all the way to investment decisions. To that end, it's integral that we're aware of just how that data works. In this Best of Whiteboard Friday edition, Tom Capper explains how the sessions metric in Google Analytics works, several ways that it can have unexpected results, and as a bonus, how sessions affect the time on page metric (and why you should rethink using time on page for reporting).
Editor’s note: Tom Capper is now an independent SEO consultant. This video is from 2018, but the same principles hold up today. There is only one minor caveat: the words "user" and "browser" are used interchangeably early in the video, which still hold mostly true. Google is trying to further push multi-device users as a concept with Google Analytics 4, but still relies on users being logged in, as well as extra tracking setup. For most sites most of the time, neither of these conditions hold.
Video Transcription
Hello, Moz fans, and welcome to another edition of Whiteboard Friday. I am Tom Capper. I am a consultant at Distilled, and today I'm going to be talking to you about how sessions work in Google Analytics. Obviously, all of us use Google Analytics. Pretty much all of us use Google Analytics in our day-to-day work.
Data from the platform is used these days in everything from investment decisions to press reporting to the actual marketing that we use it for. So it's important to understand the basic building blocks of these platforms. Up here I've got the absolute basics. So in the blue squares I've got hits being sent to Google Analytics.
So when you first put Google Analytics on your site, you get that bit of tracking code, you put it on every page, and what that means is when someone loads the page, it sends a page view. So those are the ones I've marked P. So we've got page view and page view and so on as you're going around the site. I've also got events with an E and transactions with a T. Those are two other hit types that you might have added.
The job of Google Analytics is to take all this hit data that you're sending it and try and bring it together into something that actually makes sense as sessions. So they're grouped into sessions that I've put in black, and then if you have multiple sessions from the same browser, then that would be a user that I've marked in pink. The issue here is it's kind of arbitrary how you divide these up.
These eight hits could be one long session. They could be eight tiny ones or anything in between. So I want to talk today about the different ways that Google Analytics will actually split up those hit types into sessions. So over here I've got some examples I'm going to go through. But first I'm going to go through a real-world example of a brick-and-mortar store, because I think that's what they're trying to emulate, and it kind of makes more sense with that context.
Brick-and-mortar example
So in this example, say a supermarket, we enter by a passing trade. That's going to be our source. Then we've got an entrance is in the lobby of the supermarket when we walk in. We got passed from there to the beer aisle to the cashier, or at least I do. So that's one big, long session with the source passing trade. That makes sense.
In the case of a brick-and-mortar store, it's not to difficult to divide that up and try and decide how many sessions are going on here. There's not really any ambiguity. In the case of websites, when you have people leaving their keyboard for a while or leaving the computer on while they go on holiday or just having the same computer over a period of time, it becomes harder to divide things up, because you don't know when people are actually coming and going.
So what they've tried to do is in the very basic case something quite similar: arrive by Google, category page, product page, checkout. Great. We've got one long session, and the source is Google. Okay, so what are the different ways that that might go wrong or that that might get divided up?
Several things that can change the meaning of a session
1. Time zone
The first and possibly most annoying one, although it doesn't tend to be a huge issue for some sites, is whatever time zone you've set in your Google Analytics settings, the midnight in that time zone can break up a session. So say we've got midnight here. This is 12:00 at night, and we happen to be browsing. We're doing some shopping quite late.
Because Google Analytics won't allow a session to have two dates, this is going to be one session with the source Google, and this is going to be one session and the source will be this page. So this is a self-referral unless you've chosen to exclude that in your settings. So not necessarily hugely helpful.
2. Half-hour cutoff for "coffee breaks"
Another thing that can happen is you might go and make a cup of coffee. So ideally if you went and had a cup of coffee while in you're in Tesco or a supermarket that's popular in whatever country you're from, you might want to consider that one long session. Google has made the executive decision that we're actually going to have a cutoff of half an hour by default.
If you leave for half an hour, then again you've got two sessions. One, the category page is the landing page and the source of Google, and one in this case where the blog is the landing page, and this would be another self-referral, because when you come back after your coffee break, you're going to click through from here to here. This time period, the 30 minutes, that is actually adjustable in your settings, but most people do just leave it as it is, and there isn't really an obvious number that would make this always correct either. It's kind of, like I said earlier, an arbitrary distinction.
3. Leaving the site and coming back
The next issue I want to talk about is if you leave the site and come back. So obviously it makes sense that if you enter the site from Google, browse for a bit, and then enter again from Bing, you might want to count that as two different sessions with two different sources. However, where this gets a little murky is with things like external payment providers.
If you had to click through from the category page to PayPal to the checkout, then unless PayPal is excluded from your referral list, then this would be one session, entrance from Google, one session, entrance from checkout. The last issue I want to talk about is not necessarily a way that sessions are divided, but a quirk of how they are.
4. Return direct sessions
If you were to enter by Google to the category page, go on holiday and then use a bookmark or something or just type in the URL to come back, then obviously this is going to be two different sessions. You would hope that it would be one session from Google and one session from direct. That would make sense, right?
But instead, what actually happens is that, because Google and most Google Analytics and most of its reports uses last non-direct click, we pass through that source all the way over here, so you've got two sessions from Google. Again, you can change this timeout period. So that's some ways that sessions work that you might not expect.
As a bonus, I want to give you some extra information about how this affects a certain metric, mainly because I want to persuade you to stop using it, and that metric is time on page.
Bonus: Three scenarios where this affects time on page
So I've got three different scenarios here that I want to talk you through, and we'll see how the time on page metric works out.
I want you to bear in mind that, basically, because Google Analytics really has very little data to work with typically, they only know that you've landed on a page, and that sent a page view and then potentially nothing else. If you were to have a single page visit to a site, or a bounce in other words, then they don't know whether you were on that page for 10 seconds or the rest of your life.
They've got no further data to work with. So what they do is they say, "Okay, we're not going to include that in our average time on page metrics." So we've got the formula of time divided by views minus exits. However, this fudge has some really unfortunate consequences. So let's talk through these scenarios.
Example 1: Intuitive time on page = actual time on page
In the first scenario, I arrive on the page. It sends a page view. Great. Ten seconds later I trigger some kind of event that the site has added. Twenty seconds later I click through to the next page on the site. In this case, everything is working as intended in a sense, because there's a next page on the site, so Google Analytics has that extra data of another page view 20 seconds after the first one. So they know that I was on here for 20 seconds.
In this case, the intuitive time on page is 20 seconds, and the actual time on page is also 20 seconds. Great.
Example 2: Intuitive time on page is higher than measured time on page
However, let's think about this next example. We've got a page view, event 10 seconds later, except this time instead of clicking somewhere else on the site, I'm going to just leave altogether. So there's no data available, but Google Analytics knows we're here for 10 seconds.
So the intuitive time on page here is still 20 seconds. That's how long I actually spent looking at the page. But the measured time or the reported time is going to be 10 seconds.
Example 3: Measured time on page is zero
The last example, I browse for 20 seconds. I leave. I haven't triggered an event. So we've got an intuitive time on page of 20 seconds and an actual time on page or a measured time on page of 0.
The interesting bit is when we then come to calculate the average time on page for this page that appeared here, here, and here, you would initially hope it would be 20 seconds, because that's how long we actually spent. But your next guess, when you look at the reported or the available data that Google Analytics has in terms of how long we're on these pages, the average of these three numbers would be 10 seconds.
So that would make some sense. What they actually do, because of this formula, is they end up with 30 seconds. So you've got the total time here, which is 30, divided by the number of views, we've got 3 views, minus 2 exits. Thirty divided 3 minus 2, 30 divided by 1, so we've got 30 seconds as the average across these 3 sessions.
Well, the average across these three page views, sorry, for the amount of time we're spending, and that is longer than any of them, and it doesn't make any sense with the constituent data. So that's just one final tip to please not use average time on page as a reporting metric.
I hope that's all been useful to you. I'd love to hear what you think in the comments below. Thanks.
Video transcription by Speechpad.com
Sign up for The Moz Top 10, a semimonthly mailer updating you on the top ten hottest pieces of SEO news, tips, and rad links uncovered by the Moz team. Think of it as your exclusive digest of stuff you don't have time to hunt down but want to read!
Categories
- 60% of the time… (1)
- A/B Testing (2)
- Ad placements (3)
- adops (4)
- adops vs sales (5)
- AdParlor 101 (43)
- adx (1)
- algorithm (1)
- Analysis (9)
- Apple (1)
- Audience (1)
- Augmented Reality (1)
- authenticity (1)
- Automation (1)
- Back to School (1)
- best practices (2)
- brand voice (1)
- branding (1)
- Build a Blog Community (12)
- Case Study (3)
- celebrate women (1)
- certification (1)
- Collections (1)
- Community (1)
- Conference News (1)
- conferences (1)
- content (1)
- content curation (1)
- content marketing (1)
- contests (1)
- Conversion Lift Test (1)
- Conversion testing (1)
- cost control (2)
- Creative (6)
- crisis (1)
- Curation (1)
- Custom Audience Targeting (4)
- Digital Advertising (2)
- Digital Marketing (6)
- DPA (1)
- Dynamic Ad Creative (1)
- dynamic product ads (1)
- E-Commerce (1)
- eCommerce (2)
- Ecosystem (1)
- email marketing (3)
- employee advocacy program (1)
- employee advocates (1)
- engineers (1)
- event marketing (1)
- event marketing strategy (1)
- events (1)
- Experiments (21)
- F8 (2)
- Facebook (64)
- Facebook Ad Split Testing (1)
- facebook ads (18)
- Facebook Ads How To (1)
- Facebook Advertising (30)
- Facebook Audience Network (1)
- Facebook Creative Platform Partners (1)
- facebook marketing (1)
- Facebook Marketing Partners (2)
- Facebook Optimizations (1)
- Facebook Posts (1)
- facebook stories (1)
- Facebook Updates (2)
- Facebook Video Ads (1)
- Facebook Watch (1)
- fbf (11)
- first impression takeover (5)
- fito (5)
- Fluent (1)
- Get Started With Wix Blog (1)
- Google (9)
- Google Ad Products (5)
- Google Analytics (1)
- Guest Post (1)
- Guides (32)
- Halloween (1)
- holiday marketing (1)
- Holiday Season Advertising (7)
- Holiday Shopping Season (4)
- Holiday Video Ads (1)
- holidays (4)
- Hootsuite How-To (3)
- Hootsuite Life (1)
- how to (5)
- How to get Instagram followers (1)
- How to get more Instagram followers (1)
- i don't understand a single thing he is or has been saying (1)
- if you need any proof that we're all just making it up (2)
- Incrementality (1)
- influencer marketing (1)
- Infographic (1)
- Instagram (39)
- Instagram Ads (11)
- Instagram advertising (8)
- Instagram best practices (1)
- Instagram followers (1)
- Instagram Partner (1)
- Instagram Stories (2)
- Instagram tips (1)
- Instagram Video Ads (2)
- invite (1)
- Landing Page (1)
- link shorteners (1)
- LinkedIn (22)
- LinkedIn Ads (2)
- LinkedIn Advertising (2)
- LinkedIn Stats (1)
- LinkedIn Targeting (5)
- Linkedin Usage (1)
- List (1)
- listening (2)
- Lists (3)
- Livestreaming (1)
- look no further than the new yorker store (2)
- lunch (1)
- Mac (1)
- macOS (1)
- Marketing to Millennials (2)
- mental health (1)
- metaverse (1)
- Mobile App Marketing (3)
- Monetizing Pinterest (2)
- Monetizing Social Media (2)
- Monthly Updates (10)
- Mothers Day (1)
- movies for social media managers (1)
- new releases (11)
- News (72)
- News & Events (13)
- no one knows what they're doing (2)
- OnlineShopping (2)
- or ari paparo (1)
- owly shortener (1)
- Paid Media (2)
- People-Based Marketing (3)
- performance marketing (5)
- Pinterest (34)
- Pinterest Ads (11)
- Pinterest Advertising (8)
- Pinterest how to (1)
- Pinterest Tag helper (5)
- Pinterest Targeting (6)
- platform health (1)
- Platform Updates (8)
- Press Release (2)
- product catalog (1)
- Productivity (10)
- Programmatic (3)
- quick work (1)
- Reddit (3)
- Reporting (1)
- Resources (34)
- ROI (1)
- rules (1)
- Seamless shopping (1)
- share of voice (1)
- Shoppable ads (4)
- Skills (28)
- SMB (1)
- SnapChat (28)
- SnapChat Ads (8)
- SnapChat Advertising (5)
- Social (169)
- social ads (1)
- Social Advertising (14)
- social customer service (1)
- Social Fresh Tips (1)
- Social Media (5)
- social media automation (1)
- social media content calendar (1)
- social media for events (1)
- social media management (2)
- Social Media Marketing (49)
- social media monitoring (1)
- Social Media News (4)
- social media statistics (1)
- social media tracking in google analytics (1)
- social media tutorial (2)
- Social Toolkit Podcast (1)
- Social Video (5)
- stories (1)
- Strategy (608)
- terms (1)
- Testing (2)
- there are times ive found myself talking to ari and even though none of the words he is using are new to me (1)
- they've done studies (1)
- this is also true of anytime i have to talk to developers (1)
- tiktok (8)
- tools (1)
- Topics & Trends (3)
- Trend (12)
- Twitter (15)
- Twitter Ads (5)
- Twitter Advertising (4)
- Uncategorised (9)
- Uncategorized (13)
- url shortener (1)
- url shorteners (1)
- vendor (2)
- video (10)
- Video Ads (7)
- Video Advertising (8)
- virtual conference (1)
- we're all just throwing mountains of shit at the wall and hoping the parts that stick don't smell too bad (2)
- web3 (1)
- where you can buy a baby onesie of a dog asking god for his testicles on it (2)
- yes i understand VAST and VPAID (1)
- yes that's the extent of the things i understand (1)
- YouTube (13)
- YouTube Ads (4)
- YouTube Advertising (9)
- YouTube Video Advertising (5)