MetricRaven

Tracking

What is a session in web analytics?

Also called: Visit

A session (or visit) is a group of pageviews and events from one visitor that belong together, usually ending after 30 minutes without activity. Someone who reads three pages, leaves for an hour and comes back has two sessions.

Updated

What a session is

Analytics tools record single hits: a pageview, a click, a payment. A session groups the hits of one visitor into a visit, so you can ask visit-level questions: where did this visit come from, how many pages did it see, did it bounce, how long did it last?

Sessions sit between two other counts. Unique visitors count people once per period. Pageviews count every page. One person can have many sessions, and one session many pageviews.

When a session starts and ends

Most tools end a session after 30 minutes without activity. In Google Analytics 4, a session starts when someone opens a page or screen and no session is active; GA4 then records a session_start event and a session ID. By default the session times out after 30 minutes of inactivity, and there is no limit on how long a session can last.

Tools differ in the details. Some start a new session at midnight or when the campaign source changes. GA4 credits each session to its source with a non-direct last-click rule, so a direct return visit keeps the earlier campaign. These choices are why session counts never match exactly between two tools.

Example

A visitor clicks a newsletter link at 9:00, reads two posts and leaves at 9:12. At 9:30 they come back to the pricing page, which is within 30 minutes of their last hit, so it is the same session. At 14:00 they return from a Google search and sign up. That is a second session.

Totals: 1 unique visitor, 2 sessions, 4 pageviews. The first session's source is the newsletter; the second is organic search.

How sessions are used

  • Bounce rate is the share of sessions with one pageview.
  • Average session duration and pages per session describe a typical visit.
  • Exit rate uses the last page of each session.
  • Session counts by source show which channels bring repeat visits, not just people.

Common session mistakes

  • Dividing conversions by sessions and calling it conversion rate per person. A buyer with three visits counts three times in the base.
  • Comparing sessions across tools. Timeouts, midnight splits and source rules differ.
  • Ignoring test traffic. Your own visits and staging links create real-looking sessions.
  • Reading session source as the sale's source. The session that bought is often not the one that brought the buyer; see first-touch attribution.

How MetricRaven defines a visit

In MetricRaven, a visit (session) is a visitor's activity split after 30 minutes without any event, counted in the time bucket where it starts. Bounce rate is visits with a single pageview divided by visits; session time is the longer of a visit's first-to-last event span and its recorded visible time. Traffic overview shows both, and the Reports API returns sessions, pagesPerSession and avgSessionDuration.

Revenue is not credited per session. Each payment goes to the visit that first brought the customer, even if that visit was weeks earlier. The visitor journey lists every visit with its source, so you can see the sessions in between. See Filters & segments and Visitor explorer.

Questions

How long is a session in Google Analytics 4?
By default a GA4 session ends after 30 minutes of inactivity, and there is no maximum length. You can change the timeout in the data stream's tag settings.
What is the difference between sessions and users?
Users (unique visitors) count people once per period. Sessions count visits. A person who visits three times in a week is one user and three sessions.
Does a new campaign start a new session?
It depends on the tool. Some start a new session when the traffic source changes. GA4 keeps the session and records the source from its start, using a non-direct last-click rule.
Full glossary

See visits and the revenue behind them

MetricRaven groups activity into visits for bounce rate and session time, and credits each customer's revenue to the visit that first brought them.

14-day free trial, no card required.