Google Analytics Sessions: No, this is not a collection of Google Analytics's greatest guitar-shredding jams!
Sessions are how Google Analytics tracks each time your website visitors come to your site. Understanding sessions can be a bit confusing and figuring out how Google calculates sessions can get even more confusing.
Don't despair. We have created this blog post and the video to clear up any session confusion.
We will explain how Google Analytics sessions are calculated. Then we'll break down how sessions are tracked, and how they impact your analytics.
We'll also show you an advanced strategy you can use to make sure your sessions are tracking correctly.
To round out this session jam, we'll answer a question form our Analytics Course forum. Noel sent us an excellent question about sessions, hits, and pageviews. Answering Noel's question will help you see how these measurements work together in Google Analytics.
How are Google Analytics sessions calculated?
When a webpage loads in a user's browser window, that triggers the start of a session. Once the web page finishes loading, the analytics tracking code sends data to Google.
Think of it like your website sending out a bat-signal over Gotham city. In this case, your website is commissioner Gordon, Google Analytics is Batman, and your tracking code is Gotham city.
Ok, that analogy might have made you more confused. Fine, we'll go back to the boring explanation.
The tracking code data you send to Google is recorded by Google Analytics for your account ID, and this marks the beginning of a session.
A session is the starting point for Google's measurement of a web user's experience.
A session can involve many pageviews and events that take place while a visitor is on your site. For example, multiple pageviews, a video view, and a purchase could all occur in one session. Think of a session as the wrapper for everything that happens during one continuous website visit.
Google Analytics sessions end after 30-minutes of inactivity
A session ends when a user leaves a website or goes inactive for 30-minutes. Inactivity, or “timing-out,” refers to a period of time when a user does not record a hit in Google Analytics.
When a user performs a new activity on a site following 30-minutes of inactivity, a new session begins.
What is a hit in Google Analytics?
A hit is any activity on a webpage that triggers a record in Google Analytics. The most common type of hit is a pageview. Hit activity can also include events, e-commerce transactions, and social interactions.
Any time a hit occurs, it extends a session. A new 30-minute window starts following each hit.
Changing the default Google Analytics sessions settings
You can change the way that Google handles the time limit for your sessions. You can lower your sessions timeout interval all the way down to one minute, and you can increase it to four hours.
Changing your default session settings is not necessary in most cases.
There are some use cases for increasing sessions limits. Sites like Netflix, where users spend hours watching videos, may want to increase their session timeout limit. Using longer session intervals could help these sites improve the accuracy of their analytics data.
If you do change your sessions settings, keep in mind that the change will only affect future data. This type of change can make historical comparisons of your sessions very difficult. It's not something to be taken lightly.
Hit activity and Google Analytics sessions
Analytics Course student Noel has the following questions about sessions, hits, and pageviews:
Noel wants to know how his sessions are tracked if he creates an epic blog post that takes over 30-minutes to read.
If Noel's visitor spends 35-minutes on his page and then leaves, Google records one session.
If Noel's website visitor leaves after only one pageview, they will also be recorded as a bounced visit. A bounced visit is any session that only includes one user interaction with a website. In most cases, this is a single pageveiw.
Does scrolling extend sessions in Google Analytics?
Noel specifically wants to know how scrolling down his blog post affects sessions.
To answer Noel's question, by default, page scrolling is not recorded as a hit. The default Google settings do not track page scrolling. So, page scrolling will not extend sessions.
How event tracking affects sessions
There is a way for Noel to track scrolling on his page as an event. Using Google Tag Manager, or custom code, Noel can tell Google Analytics to record scroll depth on his page.
If Noel enables scroll depth as an event on his page, Google Analytics will record page scrolling as hit activity. That hit will then extend his visitor's session.
What is a pageview?
Noel is a smart and inquisitive Analytics Course student (shameless plug). So, he also wants to know how pageviews are triggered in Google Analytics. And what a “view” means in Google Analytics.
JS is the programing language that runs on the browser side (client side) of the web experience.
When JS is triggered for a webpage, Google Analytics records a page view.
Bots do not typically execute JS, which prevents them from recording page views.
Using Real-Time reports to see pageviews in Google Analytics
You can use your Google Analytics Real-Time reports to help you see what Google is tracking on your site.
You can find your Real-Time reports in the main area of your Google Analytics interface. Real-Time reports will show you users who are recording live pageviews on your site.
You can also see which actions are extending your visitors' sessions.
Looking at hits and pageviews in your analytics code
A more advanced way to see a record of your Google Analytics tracking is by looking at the code that fires on your site. You can view your tracking code on your site using the Chrome extension Google Analytics Debugger.
After you've installed Analytics Debugger, open your web page. Then right-click and choose to inspect the page.
In your developer tools window select console and activate the Analytics Debugger extension.
Looking at pageview hits
The loading of your webpage should have triggered a hit for a pageview in Google Analytics.
Your pageview hit will look like this in your developer console:
Your console will also display any other hits that analytics records while you're on your page.
To summarize everything:
Sessions are a group interactions one visitor has with a website. They include pageviews and other events. One session will last for up to 30-minutes, without any additional activity.
A hit is any activity or event that Google analytics records as user interaction on a web page.
An event is a type of hit that you instruct Google Analytics to record. You can set-up event tracking using Google Tag Manager, or custom code.
A bounced visit occurs when a user only has one interaction with a website in a 30-minute period.
Sessions are a very straightforward aspect of analytics. But they can be difficult to understand. People often assume Google Analytics records more than it does.
Google Analytics has vast capabilities. But, if you don't set your analytics up to record user interaction, you only get the base levels of measurement.
Do you have questions about Google Analytics?
Post your question below.
We'll answer as many of your questions as we can during our weekly videos and blog posts.
This post and video was episode 11 in our 90 Day Challenge digital marketing series.
To get access to all 90 videos, subscribe to our YouTube channel. YouTube will send our subscribers weekly emails about all the videos we published over the past week.