What is a Google Analytics session and
how to measure its duration?

22 January 2020
Google Analytics session: the definition
One session comprises a set of interactions a visitor performs on your website within a given time frame.

Therefore, one session may include several interactions in a form of page views, events (button clicks), transactions (online purchases), Facebook shares (social interactions) and other activities a visitor may accomplish on your web resource.

All these interactions are separately recorded and passed over to Google Analytics via hits, where it (GA) groups these actions into individual user sessions by Client ID.

Where we can see sessions in GA reports

Information about sessions pops up throughout the majority of GA reports. To explain the importance of this metric, I have chosen the default GA Audience Overview report users usually land on when they open GA for the first time (see the screenshot below).
The Google Analytics Audience Overview report
So, let's take a closer look at this report and make some initial conclusions:
Having compared the number of Sessions and Users, we can see that they are not equal which means that within a given time frame one user generated more than one session. In other words, some users have visited my website more than once during a set period in time.
Going further, we notice that the average Number of Sessions per User is 1.24. This figure tells us that visitors were not very likely to come back to my blog to see whether I published any updates.
Later Google Analytics also points out that usually my visitors reviewed 1.73 Pages per one Session (Pages/Session). Of course, it does not mean that every single user viewed 1.73 pages, but some of them read more, and others - less. What Google Analytics is trying to show is an average level of engagement into the content I publish on my site.
The Average Session Duration is another criteria which showcases how long a user stayed on my blog. At this moment, I can only say that on an average, visitors browsed my blog for a bit more than one minute.
Last but not the least - Bounce Rate. This metric has direct relation to sessions and their duration. Bounce Rate showcases the percentage of single-page sessions which record no activity except for a single page view and, therefore, result in 00:00:00 seconds duration. Keep reading this article to find out why bounced sessions record zero seconds on the site. In the future, we will discuss Bounce Rate as a separate topic on this blog.

When does a Google Analytics session start and end?

A session starts when a user enters a web page with an embedded into it Google Analytics

Code. So, by saying "a user enters a web page", I mean the time when the page and placed in it code load. Google Analytics records the page view interaction and sends it over to GA as the first recorded event.
For a session to end, Google Analytics needs for one of the below described conditions to be met:

  • A user stays inactive for 30 minutes and more (this setting can be adjusted to another time frame, etc.).

  • At 11:59:59pm (almost midnight) of your GA's view timezone settings - this is when all temporary cookies are deleted, so at 12:00am sharp the next session will start.

  • A user entered the site via one campaign, then left and came back via another one.
Note: The default session timeout duration in Google Analytics is 30 minutes.

How does Google Analytics calculate the session duration?

The duration of the session is the sum of time spent on the pages a visitor viewed on your site.

By default, the time on page is calculated as the difference between the start times of every sequential page view.

For example, a visitor entered your Home page at 10:00am, later moved to a Contact page at 10:10am, then opened a Product catalogue at 10:20am and left your web resource.

The timings will equal:

  • Home page: 10:10 - 10:00 = 10 minutes
  • Contact page: 10:20 - 10:10 = 10 minutes
  • Product catalogue: 0 seconds because there is no second point of time. A user left and GA cannot tell us when he did it.

So the session duration of this user will equal: 10 min + 10 min = 20 minutes

Of course, I understand that a website owner would feel a bit sad that Google Analytics failed to properly track time a user spent on the Product catalogue page. That is why Google Analytics lets you help it by configuring custom events on your website, so it will track time not only between page views, but also between sequential user interactions (button and link clicks, scrolls, transactions, form submits, etc.)
Note: when you adjust the Google Analytics system - you will be able to collect more data and it will be more accurate.

Sessions involving 30 minutes of inactivity

Example #1:

Let's imagine that John enters your website at 7:00am. It means that the page loads, GA records interaction #1 and the first session begins. However, John does not find your page interesting enough, so he goes away to drink some coffee, leaving your website open in one of his browser tabs. 30 minutes pass but John does not come back. GA couldn't track any activity generated by John (after the initial page load) for 30 minutes. It means that the session is over. The duration of this session makes 0 seconds. The next time John returns to the web page will be attributed to a new session.

So the session duration of this user will equal: 0 seconds
Example #2

In the second example, Ann arrives at your website at 6:00pm, the page "A" loads and the session starts. Now she has 30 minutes for her session to expire. Then at 6:05pm she moves to another page "B" and now she has the same 30 minutes for her session to expire after the last activity. After that at 6:20pm she clicks on a Learn more button which was configured as an event on the site (by site admins in Google Analytics) and she has another 30 minutes at her command. At 6:35pm Anna becomes inactive and doesn't trigger any events on the site.

The timings on pages:

A: 6:00 - 6:05 = 5 minutes
B: 6:05 - 6:20 = 15 minutes and after the click on Learn button GA cannot trace any activity and no further interactions to be added to the time spent on page B

So the session duration of this user will equal: 5 min + 15 min = 20 minutes

End of the day sessions

Example #1

Kelly enters your website at 11:55pm on 1st of January, makes several clicks, watches a video, moves to a new page - and leaves your site at 12:40am on 2nd of January.

Her first session finishes at 11:59:59pm on 1st of January, and the second one starts at 12:00am.

Please note that the timezone of a Google Analytics view (as shown above) will apply when calculating the duration of a session.

Sessions with different campaigns

Change of the source

John enters your website via a Google search looking for "best burgers". So, in this case the source is going to be "organic" and the search term "best burgers". And while staying on your site, he continues to browse the internet and clicks on a paid ad in Google search - and is now assigned to Paid search source with the same search term. As soon as he enters your site via a new campaign, the previous one will close automatically, and the new one will start.

Note: If a person enters your website from the Direct source, it will never update an initial source a visitor used to arrive at your website for the first time.
Change of a search term

This happens not only when the source changes, but also when a search terms changes. For example, the previous session will end, if John enters your site via organic source this time looking for "burger recipe". So, in this case, the search terms does matter because it amends the campaign as well.
Change of a referring site

A campaign value updates when a person clicks a URL leading to your web resource from a third party website (a referring site). So, if Ann clicks on your link from start1.com website, a new session will start. Later if she (before the 30 minute time frame expires) goes to start2.com site and then enters your site from there, a previous session (attributed to start1.com referral site) ends and a new one commences.
Google Ads auto-tagging

In this case, every individual click will create a new unique gclid value, which is automatically attributed to a new campaign (read about auto-tagging here).
Manual UTM campaign tags

If you generate UTM tags manually and use them for paid campaigns, a new session will be recorded when a visitor clicks your ad for the first time. Every next click by the same user will not update the campaign, and therefore, the session. In other words, several clicks made by the same user within a 30-minute time period will be grouped into one user session.

How to change the default session timeout duration in Google Analytics?

Follow these steps in order to change the default session timeout duration in Google Analytics:

  • Choose the Account and Property where you want to change this default value.
  • Go to Admin section of GA.
  • Then go to the Property column, find Tracking Info => Session Settings.
  • After that you will see the Timeout Handling section, and will be able to adjust the Session Timeout value there.
  • Don't forget to click Apply to submit the changes to Google Analytics.

Time for conclusion!

So, let's refresh our memory and list the most important conclusions we can make after reading this article:

  • Always set up additional events if you want to see less of 0 second sessions in your Google Analytics reports.
  • You can adjust the default Session timeout set to 30 minutes of inactivity on the Property level.
  • A new session can be generated by the same user in case of the change of a source, a search term, a referring site, and Google ads auto-tagging.
  • Don't forget about "end of the day" sessions!
  • Manual UTM tags used for paid ads can result in generating lots of clicks and just few sessions.

And just enjoy using Google Analytics :)
comments powered by HyperComments
Made on
Tilda