Skip to content

Glossary Session

What Is a Session?

  • Analytics
Definition

A session is the group of interactions, such as page views or events, that a single user carries out on a website within a period bounded by an inactivity limit.

An hourglass with almost all its sand fallen through — beside the title Session
The sand runs out even if nobody has left
On this page 6
  1. What a session is
  2. Session in Universal Analytics versus session in GA4
  3. How it works
  4. Why it matters
  5. Best practices
  6. Common mistakes
In brief

How GA4 technically defines the start and end of a session, what changed compared to Universal Analytics' midnight reset and campaign-change session split, and how it relates to users, page views and impressions.

An hourglass with almost all its sand fallen through — beside the title Session
The sand runs out even if nobody has left

What a session is

A session is the group of interactions, whether page views or events, that a single user carries out on a website within a bounded period. That period isn't fixed to the calendar: it starts with the first interaction and ends once an inactivity limit set by the measurement tool is reached. The article on traffic already introduces the session as one of the three basic measurement units, alongside users and page views; this one goes deeper into how it's counted and bounded technically.

Within web analytics, the session is the unit that groups the behavior of one complete visit: how many pages the user went through, which events they triggered, and how long they stayed active before disappearing from the site. A single session contains at least one interaction, and almost always several: few visits are limited to loading a page and closing it in the same second.

The same user can generate several sessions over time, for example by visiting the site on a Monday to compare prices and returning the following Thursday to complete the purchase. Both visits count as two separate sessions, even though they belong to the same person.

Session in Universal Analytics versus session in GA4

CriterionUniversal AnalyticsGoogle Analytics 4
End through inactivity30 minutes by default, adjustable30 minutes by default, adjustable up to a maximum of 7 hours and 55 minutes
Midnight resetYes: a session cuts off at 11:59:59 PM and a new one starts at 12:00:00 AM the next dayNo: the session stays active across midnight as long as the user keeps interacting within the inactivity window
Campaign source changeCloses the open session and opens a new one, even if the inactivity time hasn't elapsedDoesn't close the session on its own; the recorded source stays the one from when that session started

This difference isn't cosmetic: it explains why, for the same real traffic, Universal Analytics tended to count more sessions than GA4. A user who arrived through organic search at 11:50 PM, kept browsing past midnight, and came back later through an ad could generate up to three sessions in Universal Analytics; in GA4, that same sequence of behavior can be logged as a single session, as long as it doesn't cross the inactivity limit.

How it works

GA4 fires the session_start event when a user either opens the app in the foreground or views a page or screen with no session currently active. From there, the platform assigns a session ID that stays attached to every following event until the inactivity limit is reached.

That limit is 30 minutes by default, but it can be adjusted from Admin > Data Streams > Configure tag settings > Adjust session timeout, up to a maximum of 7 hours and 55 minutes. Unlike Universal Analytics, neither a mid-session campaign source change nor crossing midnight closes the session on its own: only prolonged inactivity does.

The technical foundation that holds this chain of events together is a session cookie, which stores the identifier for as long as the browser stays open. Without that identifier, the measurement tool would have no way of knowing that two consecutive page views belong to the same visit.

The count gets more complicated when the same user browses from several devices: if they visit from mobile in the morning and from desktop in the afternoon without being signed into an account that links the two, GA4 treats them as two users and two independent sessions, even though it's the same person. The only way to join both visits runs through Google Signals, which links the session to the user's Google account when they're signed in and have enabled ad personalization, also feeding the demographic data tied to that session.

Why it matters

Measuring sessions accurately matters because other metrics get derived from it: how many visits a campaign needs to produce a conversion, or how long a specific target audience stays on average before leaving. If the session definition shifts between tools without the team knowing, those conclusions stop being comparable from one period to the next.

A session also marks the line between search visibility and an actual visit: an impression logged in Search Console only shows that a result appeared on screen, not that the user ever reached the site. Plenty of impressions never turn into a session, and keeping the two figures apart stops reach from getting confused with real traffic.

Grouping sessions through segmentation makes it possible to compare behavior across different traffic sources or user types, which only works if the base unit, the session, gets counted consistently. And that count depends, first of all, on the user's consent allowing the session cookie to be set in the first place.

Best practices

  • Adjust the session timeout, which allows up to 7 hours and 55 minutes, if your site naturally generates long sessions, such as video or documentation, instead of leaving the 30-minute default in place.
  • Don't compare historical Universal Analytics sessions with GA4 ones in the same report without flagging that the definition changed.
  • Check that the session cookie only fires after the user gives consent, not before.
  • Use segmentation to separate sessions with real engagement from those without before drawing conclusions about a campaign.
  • Check what share of users repeat a session across multiple devices before assuming each user is a distinct person.
  • Cross-check impression counts against session counts to spot pages that show up in search but don't attract real visits.

Common mistakes

  • Assuming GA4 resets the session at midnight, a behavior that existed in Universal Analytics but not in GA4.
  • Expecting a mid-session campaign source change to open a new session, something that only happened in Universal Analytics.
  • Confusing the number of sessions with the number of real users, without accounting for the same person generating several sessions over time.
  • Treating a search impression as if it automatically counted as a visit to the site.
  • Leaving the session timeout at its default value without checking whether it fits how visitors actually behave.
Manuel Riveiro Rodriguez CEO & Digital Strategist

A technical audit covers this and everything else in one pass.

Request an audit

Frequently asked

How long does a session last in Google Analytics 4 by default?

By default, a GA4 session ends after 30 minutes of user inactivity. That limit can be adjusted from Admin, up to a maximum of 7 hours and 55 minutes, depending on content type: a site with long videos usually needs a longer timeout than an online store.

Why does GA4 usually count fewer sessions than Universal Analytics for the same traffic?

Because Universal Analytics closed the session at midnight and every time the campaign source changed, even if the user hadn't stopped browsing. GA4 removed both triggers: it only opens a new session after a period of inactivity, which merges visits that used to get counted separately.

Are a session and a user the same thing in web analytics?

No. A user is the person behind a visit; a session is each specific visit that person makes. The same user can generate several sessions on different days, so a report's session count almost always runs higher than its user count.

What happens if the same user visits the site from mobile and from desktop without signing in?

GA4 logs them as two users and two independent sessions, because it has no way of knowing it's the same person without a shared identifier. Only Google Signals can link that activity across devices, and only when the user is signed into their Google account.

Do I need user consent to measure sessions?

Yes. A session relies technically on a cookie that identifies the visitor, and in the European Union, setting that cookie requires the user's prior, explicit consent under the ePrivacy Directive. Without that consent, the measurement tool shouldn't log the session at all, regardless of which analytics platform runs behind the scenes.