Google Analytics 4 Session: A Comprehensive Guide

Author

Reads 678

Laptop displaying Google Analytics in a modern workspace, highlighting digital analytics and technology.
Credit: pexels.com, Laptop displaying Google Analytics in a modern workspace, highlighting digital analytics and technology.

Google Analytics 4 (GA4) has revolutionized the way we measure user behavior, and understanding its session concept is key to unlocking its full potential.

A session in GA4 is a sequence of user interactions with your website or app, which can be up to 2 months long.

Each session is unique and can be triggered by various events, such as page views, screen views, or even outbound link clicks.

The 2-month session limit allows for more accurate measurement of user behavior, especially for users who may not complete a purchase or goal on their first visit.

This approach also helps to reduce the impact of session fragmentation, where users are counted multiple times across different sessions.

GA4's session concept is designed to provide a more comprehensive view of user behavior, allowing you to better understand your audience and make data-driven decisions.

Understanding Session Calculation

In Google Analytics 4, a session is initiated when a user opens your app in the foreground or views a page or screen without having an active session. A session ends after 30 minutes of user inactivity, unless you adjust the threshold in the GA4 UI.

Explore further: Nextjs Session

Credit: youtube.com, Google Analytics Events, Hits, Sessions, and Users Explained: GA4 vs UA

You can adjust the session timeout in the GA4 UI to lengthen the session time window, which can be helpful for Ecommerce sites where customers leave the screen for an hour or two and return to finish the purchase.

A session is calculated based on unique session IDs, which are automatically assigned by Google when a session begins. You can also create Exploration Reports using this metric, which can help you understand small discrepancies between your UA and GA4 sessions.

Here's a breakdown of how sessions are calculated in GA4:

  • ga_session_id: Every time a user visits your website, they are given a new session id parameter with the session_start event.
  • ga_session_number: This is simply a count of sessions for that user.

How Is Calculated

In Google Analytics 4, a session is initiated when a user opens your app in the foreground or views a page (web) or screen (app) without an active session. The session ends after 30 minutes of user inactivity, meaning no new event was triggered in the last 30 minutes.

By default, the 30-minute threshold cannot be modified, but in GA4, you can easily adjust it. This is particularly helpful for ecommerce sites where customers may leave the screen for an hour or two and return to finish their purchase.

Credit: youtube.com, Calculating session duration, time on site, and other session-based metrics - PostHog tutorial

The 30-minute threshold is a crucial aspect of session calculation, and changing it will impact session numbers and related metrics in Google Analytics 4.

A unique session ID, ga_session_id, is automatically assigned by Google when a session begins, along with the session number, ga_session_number. This unique ID is given to the user every time they visit your website, and a single user can have multiple session IDs for every session.

Here's a quick rundown of the key terms related to session calculation:

  • ga_session_id: a unique ID assigned to a user's session
  • ga_session_number: a count of sessions for a user

These unique IDs are used to calculate the number of sessions, which is essential for understanding user behavior and engagement on your website or app.

Day Boundary

Let's talk about the day boundary and how it affects session calculation. Google Analytics 4 doesn't create a new session even if a session spans across two days.

In contrast, Universal Analytics creates a new session if a session spans across two days. This means that the way you track sessions can vary depending on the type of analytics you're using.

Credit: youtube.com, vocation days calculation 🥳 #excel #shortsvideo

It's worth noting that this difference can impact how you analyze user behavior and make decisions based on your analytics data. For example, if you're using Universal Analytics and a session spans across two days, you'll see two separate sessions in your reports, but if you're using Google Analytics 4, you'll see a single session.

Here's a quick comparison of the two:

Session Termination

In Google Analytics 4, a session ends if there is inactivity for 30 minutes, which is the default time frame and can be adjusted in the Admin settings.

This is a simplified criteria compared to Universal Analytics, where a session can end due to inactivity, campaign parameter changes, or a new day beginning.

The default session timeout in GA4 is 30 minutes, but you can adjust it to a minimum of 5 minutes and a maximum of 7 hours and 55 minutes.

To adjust the session timeout, navigate to Data Streams, select the Data Stream you want to modify, and click on Adjust session timeout.

Here's a summary of the session timeout settings in GA4 and UA:

Make sure to set the session timeout to the same value in both tools to avoid discrepancies in session counts.

Timeout

Credit: youtube.com, Lecture 45- Testing For Session Timeout

Timeout settings can be adjusted in both Google Analytics 4 and Universal Analytics. The default session timeout for both tools is 30 minutes. However, this can be modified to suit your needs.

The minimum session timeout value for Google Analytics 4 is 5 minutes, while the maximum is 7 hours and 55 minutes. In contrast, Universal Analytics has a minimum of 1 minute and a maximum of 4 hours.

It's essential to note that session timeout settings should match in both tools to ensure accurate session counts. If they don't, it can lead to discrepancies.

Here's a summary of the session timeout settings for both tools:

To adjust the session timeout, simply click on the relevant settings in your Google Analytics 4 or Universal Analytics account.

Termination

A session in Google Analytics (GA) ends under specific conditions, and understanding these criteria is essential for accurate tracking.

In Universal Analytics (UA), a session ends if there's inactivity for 30 minutes, the campaign parameters change, or it's 12:00am in the timezone configured for the view.

Credit: youtube.com, 𝗦𝗲𝗰𝗿𝗲𝘁𝘀 𝗼𝗳 𝗦𝗲𝘀𝘀𝗶𝗼𝗻 𝗧𝗲𝗿𝗺𝗶𝗻𝗮𝘁𝗶𝗼𝗻 𝗥𝗲𝘃𝗲𝗮𝗹𝗲𝗱! 🤯 #shorts

The session termination criteria in UA is more complex, with multiple factors at play.

In Google Analytics 4 (GA4), the criteria has been simplified. A session will only expire if there's inactivity for 30 minutes, which is the default time frame and can be adjusted in the Admin settings.

This change in criteria may result in fewer sessions being reported in GA4 compared to UA.

Session Tracking

Session tracking in Google Analytics 4 (GA4) can be a bit tricky, especially when compared to Universal Analytics (UA). One key difference is how sessions are calculated, which can lead to varying session counts between the two platforms.

GA4 sessions are calculated differently than UA sessions, so your session count might be higher or lower in GA4 depending on how users interact with your website and app, as well as how your analytics properties are set up.

To ensure accurate comparisons, make sure you're looking at the same date range and user segment in both platforms, and double-check that all your tags are firing correctly in both.

Here are some key differences to keep in mind:

  • UA starts a new session at midnight
  • UA starts a new session if the user encounters a UTM parameter

Session Filters and Bots

Credit: youtube.com, How To Identify (And Remove) Bots From Google Analytics 4

Session filters play a crucial role in ensuring the accuracy of your Google Analytics 4 (GA4) session data. You can filter out bot traffic in GA4 using the built-in automatic filter, but this is the only option currently available.

If you're using Universal Analytics (UA), you have more flexibility with view-level filters to reduce bot traffic. You can also apply filters at the view level to block out unwanted sessions.

Here are the key differences in bot traffic filtering between GA4 and UA:

  • GA4: built-in automatic filter for bot traffic only.
  • UA: built-in filter (tick box at view-level) and additional view-level filters to reduce bot traffic.

It's essential to be aware of the filters applied in both GA4 and UA properties, as this can impact the overall session count. Currently, UA provides more filtering options, which may block out traffic being passed through to GA4.

Don't Match with

Sessions in Google Analytics 4 often don't match with Universal Analytics due to various reasons.

In my experience, sessions in GA4 are usually lower compared to UA, with differences of up to 20% being common. This is why I apply certain thresholds when investigating discrepancies.

Expand your knowledge: Google Cloud Next Sessions

Credit: youtube.com, Filtering Bot Traffic in GA4

Here are some guidelines to help you assess the situation:

  • Good: session difference between GA4 and UA is smaller than 8%.
  • Further investigation needed: session difference between GA4 and UA is between 8 and 20%.
  • Something is wrong (in most cases): session difference between GA4 and UA is greater than 20%.

If you find a large difference, it's likely that something is amiss and requires attention.

Campaign Source Change

Campaign Source Change is a crucial aspect to consider when working with session filters and bots. Google Analytics 4 doesn't create a new session when the campaign source changes mid-session.

This is in contrast to Universal Analytics, which does create a new session under the same circumstances.

Filters

Filters play a crucial role in determining session counts in Google Analytics. Currently, Google Analytics 4 (GA4) has very limited filter options, only allowing you to filter out "internal" or "debug" traffic.

Universal Analytics (UA), on the other hand, provides more flexibility with its filter model, allowing you to filter out many more sessions. However, this also means that UA can potentially block out traffic that is being passed through to GA4.

If you're using both GA4 and UA, be aware that the filters in place for each property can affect the overall session count. This is because UA provides more filtering options, including custom filters that can exclude certain data from reporting views.

Credit: youtube.com, ThriveTracker How To: Bot Filters

GA4, on the other hand, applies filters at the property level and currently offers only two types of filters: include/exclude internal traffic, or include/exclude developer traffic. This is a stark contrast to UA, which has reporting views that can be filtered to exclude specific data.

To give you a better idea of the differences, here's a comparison of the filter options for GA4 and UA:

Keep in mind that the filters in place for each property can affect the session count, so it's essential to compare the sessions in GA4 to the raw data in UA (no filters applied) to get a more accurate picture.

Bots

Bots can be a nuisance when it comes to tracking website traffic. Google Analytics 4 has a built-in filter for bot traffic, which automatically filters out bot traffic.

If you're using Universal Analytics, you have a few options to deal with bot traffic. You can use the built-in filter at the view level, which is a tick box that you can enable to reduce bot traffic.

Credit: youtube.com, How To Identify (And Remove) Bots From Google Analytics 4

To further reduce bot traffic in Universal Analytics, you can also set up view-level filters. This allows you to create custom filters that can help block specific types of bot traffic.

Here's a quick rundown of the options available in Universal Analytics for dealing with bot traffic:

  • Tick box at view-level filter for bot traffic
  • View-level filters to reduce bot traffic

Frequently Asked Questions

What is the difference between views and sessions in GA4?

In GA4, views count each time a page is loaded, including repeat views by the same user, whereas sessions represent a single visit with a clear start and end, potentially including multiple views. Understanding the difference between views and sessions helps you analyze user behavior and page popularity.

What is the difference between sessions and engaged sessions in GA4?

Sessions in GA4 track user interactions, while engaged sessions specifically measure time spent on your website or app (lasting over 10 seconds), providing a more accurate view of user engagement

What is the difference between event and session in GA4?

In Google Analytics 4 (GA4), a session is a timeframe of user activity, while an event is a specific action taken within that session, such as a click or form submission. Understanding the difference between sessions and events is key to tracking user behavior and optimizing your website or app.

Calvin Connelly

Senior Writer

Calvin Connelly is a seasoned writer with a passion for crafting engaging content on a wide range of topics. With a keen eye for detail and a knack for storytelling, Calvin has established himself as a versatile and reliable voice in the world of writing. In addition to his general writing expertise, Calvin has developed a particular interest in covering important and timely subjects that impact society.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.