Preferences

Privacy is important to us, so you have the option of disabling certain types of storage that may not be necessary for the basic functioning of the website. Blocking categories may impact your experience on the website. More information (Cookie Policy)

Sessions in Google Analytics: What They Are and How GA4 Counts Them

A session in Google Analytics is one visit to your site. Learn how GA4 starts, ends and counts sessions, and how they differ from users and UA.

Sorank customerSorank customerThomas Girauc, Sorank customerCelio Fabiano, Sorank customerSorank customerXavier Breull, Sorank customer
+ 9'000 Subscribers
Sessions in Google Analytics: What They Are and How GA4 Counts Them
Notification: your site reached 20K clicks from Google Search in 28 days

Tools

On this page

Summary

A session in Google Analytics is a period during which one user interacts with your website or app, starting with a first page view or app open and ending after 30 minutes of inactivity by default. GA4 counts sessions by estimating the number of unique session IDs, so one user can generate many sessions.

Want to go further? Ask

Sessions in Google Analytics are the unit that turns a stream of clicks into visits. Every page view, scroll, click or purchase belongs to a session. When you read "sessions" in a report, you read how many separate visits your site received, not how many people came. This page explains how a session starts and ends, how Google Analytics 4 (GA4) counts it, how it differs from Universal Analytics and from users, and which mistakes distort the number.

What is a session in Google Analytics?

A session is a group of interactions one user has with your site within a given time frame. Google's legacy documentation calls it the container for a user's actions: a single session can hold several page views, events and ecommerce transactions (Analytics Help, How a web session is defined in Universal Analytics).

In GA4, the definition is the same idea with an event-based model. A session starts when a user opens your app in the foreground or views a page while no session is active. It ends after a period of inactivity. There is no limit on how long a session can last, as long as the user keeps interacting.

Think of it this way: a user is a person (or more exactly, a browser or device), a session is one visit of that person, and an event is one action during the visit.

When does a session start and end in GA4?

A GA4 session starts with the first page or screen view when no session is active, and ends after 30 minutes without any interaction. Each new interaction resets the 30-minute countdown.

Google's own example makes it concrete. A user arrives at 14:01, so the session would expire at 14:31. They interact at 14:02, and the expiry moves to 14:32. If they then take a 29-minute break, the session continues as if they never left. If the break lasts 31 minutes, the first session ends and a new one starts when they come back (Analytics Help, legacy session example).

So a session ends in GA4 in only one case: inactivity longer than the timeout. Closing the tab does not end it immediately. Opening a second tab does not create a second session.

Note

The 30-minute default is a setting, not a law. On the web, you can change it per data stream. Google's developer guide on GA4 sessions gives a maximum of 7 hours and 55 minutes.

How does GA4 count sessions?

GA4 counts sessions by estimating the number of unique session IDs it received. When a session begins, Analytics collects a session_start event and generates two values that are attached to every following event:

  • ga_session_id: the timestamp, in seconds, of the moment the session started.
  • ga_session_number: how many sessions this user has started so far (1 for the first visit, 2 for the second, and so on).

Google explains that sessions are estimated by counting unique session IDs, and that since October 2021 this count uses HyperLogLog++ (HLL++), an algorithm that estimates distinct counts (Analytics Help, About Analytics sessions). The result is very close to the real number, but not identical. Google's example shows 1463 sessions in reports against 1501 in BigQuery for the same week, and both sources show the same 25% growth week over week.

Google Analytics Help page explaining how GA4 defines, times out and counts sessions
Screenshot of support.google.com

Because ga_session_id is only a timestamp, two users can start a session in the same second. In BigQuery, you get a unique session key by combining it with the user identifier:

SELECT COUNT(DISTINCT CONCAT(user_pseudo_id, CAST((SELECT value.int_value FROM UNNEST(event_params) WHERE key = 'ga_session_id') AS STRING))) AS sessions FROM `your-project.analytics_123456789.events_*`

Note also that events sent through the Measurement Protocol or Data Import do not carry a session ID automatically. If you send server-side events, add it yourself or they will not join any session.

How are sessions different in GA4 and Universal Analytics?

GA4 ends a session only on inactivity, while Universal Analytics also cut sessions at midnight and on every campaign change. Google's comparison page states that in GA4, "sessions aren't restarted at midnight or when new campaign parameters are encountered," and that GA4 uses a statistical estimate where Universal Analytics did not (Analytics Help, Comparing metrics: Google Analytics vs. Universal Analytics).

RuleUniversal AnalyticsGA4
Inactivity timeout30 minutes by default30 minutes by default
New session at midnightYes, in the view's time zoneNo
New session on campaign changeYes (new source, new gclid, new referrer)No
How the total is calculatedExact countEstimate (HLL++)
Bounce rateSingle-page sessions with no interactionSessions that were not engaged

The practical effect: a user who visits at 23:50 and leaves at 00:10, or who comes back through a paid ad during an organic visit, made two sessions in Universal Analytics and makes one in GA4. That is why GA4 often shows fewer sessions than the old property did for the same traffic. Universal Analytics has been retired, so this mainly matters when you compare old reports with new ones.

What is the difference between sessions and users?

Users count people (browsers or devices, in practice), sessions count visits. One user who comes three times in a week counts as one user and three sessions. In GA4, the "Users" label in most reports refers to active users, the number of distinct users who visited your site or app.

MetricWhat it countsTypical relation
UsersDistinct people (browser or device IDs)The smallest number
SessionsDistinct visits of those usersEqual to or higher than users
ViewsEvery page or screen load, repeats includedEqual to or higher than sessions
EventsEvery action recordedThe largest number

The ratio of sessions to users tells you how often people come back. A rising ratio means returning visitors. For the first-visit side of the story, read our definition of new users in analytics.

Sessions and views also differ by page. Google's developer guide gives the example of a visit going from /home to /products and back to /home: /home gets 2 views but 1 session, /products gets 1 view and 1 session. If you add up the session column you get 2, but the visit was only 1 session (Google for Developers, GA4 sessions).

Google for Developers guide showing how GA4 counts sessions and views per page path
Screenshot of developers.google.com

What is an engaged session?

An engaged session is a session that lasts 10 seconds or longer, has at least one key event, or has 2 or more page or screen views (Analytics Help, engaged session definition). It is the base of the GA4 engagement rate, and the GA4 bounce rate is simply the share of sessions that were not engaged. We cover the formula and good values in our page on engaged sessions and engagement rate.

Other session-based metrics you will meet in reports:

  • Engaged sessions per user: how many engaged visits each person makes.
  • Average engagement time per session: the time your page was in focus, per visit.
  • Session key event rate: the share of sessions with at least one key event.
  • Average session duration: the mean length of a visit, from first to last event.

Where do you find sessions in GA4 and how do you change the timeout?

You find sessions in the Acquisition and Engagement reports and in Explorations. The Traffic acquisition report is the most useful one: it shows sessions by session source, medium and default channel group, so you see how many visits came from organic search, referral or direct. To break them down further, use session-scoped GA4 dimensions such as session source or landing page.

To change the session timeout on a website:

  1. Go to Admin, then Data streams, and open your web stream.
  2. Open Configure tag settings, then Adjust session timeout.
  3. Set the new duration and save. The change applies to data collected after that moment, not to past data.

Change it only if your visitors really stay inactive for long periods with the page open: long video courses, documentation read next to a code editor. For a classic blog or online shop, keep the default.

Common session tracking mistakes

Most wrong conclusions about sessions come from a few avoidable errors.

  • Adding up sessions across pages. What it is: summing the Sessions column of a page report to get the site total. How to spot it: your sum is higher than the total shown in the report header. How to fix it: take the deduplicated total, or use the landing page dimension, where each session has only one row.
  • Comparing GA4 and Universal Analytics counts as if they were the same metric. What it is: reading a drop in sessions after the migration as a loss of traffic. How to spot it: users are stable while sessions dropped. How to fix it: compare trends within the same tool, and remember the midnight and campaign rules.
  • Sending keep-alive pings. What it is: a script that fires an event every few minutes to keep sessions open. How to spot it: very long average session durations and an engagement rate that looks too good. How to fix it: Google's developer guide advises against these "zombie sessions"; send real user-initiated events, such as video progress, instead.
  • Expecting reports to match BigQuery exactly. What it is: treating a small gap between the interface and the export as a bug. How to spot it: a gap of a few percent with identical trends. How to fix it: accept the HLL++ estimate for reporting, and use BigQuery when you need exact counts.
  • Treating sessions as people. What it is: reporting sessions as "visitors". How to spot it: your "visitor" number is higher than users. How to fix it: use users for audience size and sessions for visit volume.

Why do sessions matter for SEO and GEO?

Sessions are the number that tells you whether your search visibility turns into visits. Search Console shows clicks from Google; GA4 shows the sessions those clicks start, and what happened next. Filtering sessions on the Organic Search channel is the standard way to measure organic traffic growth, and our guide on using GA4 to measure organic and AI traffic shows the setup step by step.

For GEO, sessions are also how you see visits from AI assistants. A user who clicks a source link in ChatGPT, Gemini or Perplexity starts a session with that referrer, so you can count those visits and compare their engagement with Google visits. If you want Google and AI traffic in one place without building reports, the Sorank GEO and SEO dashboard brings Search Console, Analytics and visits from AI assistants together.

Conclusion

A session in Google Analytics is one visit: it starts with a first interaction and ends after 30 minutes of inactivity by default. GA4 does not cut sessions at midnight or on campaign changes, estimates the total with HLL++, and adds engaged sessions to separate real visits from quick exits. Read sessions next to users and views, never add them up across pages, and track them by channel to see what your SEO and your AI visibility really bring. To see how all visit sources fit together, read our overview of website traffic sources.

Sources

Frequently asked questions

How long is a session in Google Analytics?

A session has no maximum length: it lasts as long as the user keeps interacting. It ends after 30 minutes of inactivity by default, and you can change that timeout in the settings of your web data stream.

Why are there more sessions than users in Google Analytics?

Users count distinct people (browsers or devices), while sessions count their visits. One person who comes back several times counts as one user and several sessions, so sessions are usually equal to or higher than users.

Does a new session start at midnight in GA4?

No. Universal Analytics started a new session at midnight and on every campaign change, but GA4 ends a session only after the inactivity timeout. This is one reason GA4 often reports fewer sessions than Universal Analytics did.

Our Blog for Ambitious Company

Testimonials from ambitious founders

0 to 10000 visitors in 5 months

Celio Fabianomonrobotlavevitre.frGoogleE-commerce

0 to 5000 visits in 8 months

Thibault BMsorank.comGoogleSoftware

0 to 1104 clicks in 4 months

Dominiqueflight-sensations-idf.comGoogleLeisure and aviation

0 to 163 clicks in 6 months

Coworking Pariscoworking-paris.frGoogleOffice broker

x92 clicks in 7 months

Guide Zanzibarguidezanzibar.comGoogleTravel