Understanding Sessions in Google Analytics

How does Google Analytics define a session?

In Google Analytics, a session is a group of hits recorded for a user in a given time period.

A hit is a user’s interaction (pageview, screenview, event, transaction etc) with your website that results in data being sent to the Google Analytics server.

A user can generate one or more sessions. All Google Analytics sessions have got expiry date. They can’t last longer than 4 hours.

Difference between a web session and Google Analytics session

A web session is a series of HTTP requests and HTTP responses exchanged between a web browser and a web server in a given time period.

Whereas, a Google Analytics session is a group of hits recorded for a user in a given time period.

So web session and google analytics session are not the same thing.

It is important that you understand this difference.

In this way when you talk to your developer, he doesn’t get confused.

For a web developer, a session most likely means a web session.

So if you are referring to Google Analytics session then you need to explain the difference between a web session and a google analytics session to your developer.

Get the e-book (37 Pages)

Learn to read e-commerce reports book banner

Get the E-Book (104 Pages)

When does a Google Analytics session expire?

By default

A GA session expires, if no new hit is sent to GA server within 30 minutes from the time when the last hit was sent. 

In layman language we call this period of no new hit sent as ‘no user’s activity’ on a website.

A GA session automatically expire at midnight (11:59:59 pm)

For example, if a user is browsing your website since 11:45 pm, his session will automatically terminate at 11:59:59 pm even if he continue to engage with your website. At 12 am a new GA session will start for your user.

A GA session can also expire if a user return to your website via a different campaign source.

The campaign source could be: search engines, referring websites, URLs with campaign parameters.

It doesn’t matter whether the user returns within 30 minutes or after 30 minutes, every time a campaign source is changed, the existing session expires and a new GA session starts.

Example-1:

If a user visit your website via organic search listing the first time but later (say after 15 minutes) return to your website via paid search ad then the return visit will end the existing GA session and trigger a new GA session, as the campaign source has changed.

Example-2:

If a user visit your website via paid search ad the first time but later (say after 15 minutes) return to your website, by again clicking on the same paid search ad and Google Adwords autotagging is enabled then the return visit will end the existing GA session and trigger a new GA session as the campaign source has changed.

Here the campaign source changed because GCLID value changed.

In case of Google Adwords autotagging, each ad click has its own GCLID value. So multiple clicks on an ad can generate multiple GA sessions.


Example-3:

If a user visit your website via paid search ad the first time but later (say after 15 minutes) return to your website, by again clicking on the same paid search ad and you are using manual tagging instead of Google Adwords autotagging then the return visit will not end the existing GA session and not trigger a new GA session as the campaign source has not changed.

Here the campaign source did not change because the campaign tracking parameters did not change with each click on the ad.

So if you are manually tagging your adwords campaigns then multiple clicks on a same ad by a same user will not generate multiple GA sessions.

 

Example-4:

If a user visit your website via organic search listing the first time but later (say after 15 minutes) return to your website directly then the return visit will not end the existing GA session and not trigger a new GA session, as direct traffic does not override the campaign source.

 

Example-5:

If a user visit your website via organic search listing the first time but later return to your website directly, after 30 minutes have elapsed then the return visit will end the existing GA session and trigger a new GA session.

This happened because, by default GA session expires after 30 minutes of users’ inactivity.

 

Example-6:

A GA session does not expire if a user navigate to another website but return to your website within 30 minutes.

How can a Google Analytics session last longer than 30 minutes?

Every time a new hit is sent in a GA session, Google Analytics reset the expiration date of the session by adding another 30 minutes from the time when the last hit was sent.

In this way a session can last longer than 30 minutes.

How to change session timeout settings

By default a session expires after 30 minutes of users’ inactivity. You can change this setting by changing the session timeout settings in your GA view.

You can make a session expire after 3 minutes of users’ inactivity or after 3 hours of users’ inactivity. However

A GA session timeout can not be less than 1 minute or greater than 4 hours.

To change session timeout settings, follow the steps below:

Step-1: Go to the ‘Admin’ section of your GA view and then click on ‘sessions settings’ link:

session settings

Step-2: Change the session timeout settings under ‘Timeout Handling’ and then click on the ‘Apply’ button:

session timeout

How to decide the length of a Google Analytics session for your website

The length of GA session you decide to choose, depends upon, how much time a user spent on an average on your website.

If for some reason an average user has to spend lot of time on your website (say 3 hours on an average) to engage with your website content or complete some task (file an application, play a game etc) then you should set the session timeout to match the length of the time spent.

You can use average time spent on your website to decide the length of your GA sessions. So for example, if average time spent is 3 minutes, you can set the session timeout setting to 3 minutes instead of 30 minutes.

How to force a Google Analytics session to start and end

There may be situations where you want to force a GA session to start and end depending upon user’s activities.

You can do that by using the sessionControl configuration parameter while sending a hit.

The sessionControl configuration parameter is used to control the duration of a session. It can have two values: start and end

The value of ‘start’ forces a new session to start with a specified hit.

The value of ‘end’ forces a current session to end with a specified hit.

For example,

ga(‘send’, ‘pageview’, {‘sessionControl’: ‘start’}); // start a new GA session

ga(‘send’, ‘pageview’, {‘sessionControl’: ‘end’}); // end current GA session

How to measure quality of Google Analytics sessions

You can measure the quality of a Google Analytics session in terms of closing a sale through the ‘Session Quality report’. To learn more about this report, read this article: Understanding Session Quality data and report in Google Analytics

Why Google Analytics Show Zero Sessions?

You may sometime see zero sessions assigned to a page but at the same time see pageviews, user count, exits and other metrics for the page:

How come a page has got pageviews but is still not a part of a GA session?

How come a page has got 1 user but still no GA session is assigned to it?

This happened because Google Analytics assign session count only to the first hit in a session.

You can learn more about this issue from this article: Why Google Analytics Show Zero Sessions?

Other article you will find useful: How to identify web pages with zero traffic in Google Analytics

Learn about the Google Analytics Usage Trends Tool

The Google Analytics usage trend is a new tool which is used to visualise trends in your Google Analytics data and to perform trend analysis.


Do you want to Learn Web Analytics in 8 Weeks?

  • Learn and Master Web Analytics, Conversion Optimization & Google Analytics from Industry Expert in 8 weeks.
  • Lifetime access to the course + Lifelong FREE course updates.
  • New study material added every few months (lifelong learning).
  • Up to date training material.
  • Most exhaustive course on Google Analytics on the internet.
  • Hundreds of Assessments to test your learning.
  • Your 24/7, 365 days a year reference source.
  • Learn at your own pace and from any place.

Take your Analytics knowledge to the next level. Checkout my Best Selling Books on Amazon

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and Beyond
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Himanshu Sharma

Certified web analyst and founder of OptimizeSmart.com

My name is Himanshu Sharma and I help businesses find and fix their Google Analytics and conversion issues. If you have any questions or comments please contact me.

  • Over eleven years' experience in SEO, PPC and web analytics
  • Google Analytics certified
  • Google AdWords certified
  • Nominated for Digital Analytics Association Award for Excellence
  • Bachelors degree in Internet Science
  • Founder of OptimizeSmart.com and EventEducation.com

I am also the author of three books:

error: Alert: Content is protected !!