About cookies on this site

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. Learn more

Cookie settings

About cookies on this site

Cookies used on the site are categorized and below you can read about each category and allow or deny some or all of them. Learn more

Necessary

Some cookies are required to provide core functionality. The website won't function properly without these cookies and they are enabled by default and cannot be disabled.

Preferences

Preference cookies enables the web site to remember information to customize how the web site looks or behaves for each user. This may include storing selected currency, region, language or color theme.

Analytical cookies

Analytical cookies help us improve our website by collecting and reporting information on its usage.

Marketing cookies

Marketing cookies are used to track visitors across websites to allow publishers to display relevant and engaging advertisements. By enabling marketing cookies, you grant permission for personalized advertising across various platforms.

  • Courses
    • Paid courses
    • Course bundles
    • Free courses
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login
  • Courses
    • Paid courses
    • Course bundles
    • Free courses
  • Blog
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • Services
  • About
    • About
    • Contact
  • Login

September 18, 2024

Google Analytics 4 Shows Just One Total User. Why?

Here’s a situation: you are looking at the report in Google Analytics 4 and only one total user is displayed. It might be 1 user in the Events report, or Traffic Acquisition report, or somewhere else.

google analytics shows just one total user

Subscribe and Get the Ebook - 20 GA4 mistakes

Why is this happening?

This might be caused by an incorrect implementation of the User ID. In a nutshell, User ID is useful if your website has a login feature and visitors can sign in with different devices. When the same user logs in with different devices, Google Analytics will understand that it’s the same user.

A sample configuration in Google Tag Manager might look like this:

But there’s a catch. If the user hasn’t logged in, you should NOT send some placeholder value to GA4, for example, “none”, 0 (zero), or “undefined” (with quotes).

Other incorrect examples of placeholder user_id for non-logged-in users:

  • “N/A”
  • “not logged in”
  • “anonymous”
  • false

I think you get the idea now.

 

The Solution

If user_id is not available yet on a page (e.g., in the dataLayer), the developer should not push that parameter to the dataLayer at all. Or it can be pushed as undefined (without quotes). Then user_id will work as expected.

But if a developer is pushing some static placeholder value as the user_id when the user has not yet signed it, Google Analytics will treat this as an actual ID. This means that all non-signed-in users will be treated as the same user with the same ID. Hence 1 Total User in the GA4 reports.

Subscribe and Get the Ebook - working with reports in ga4

How Google Analytics tags in GTM handle undefined values

If you have a variable that reads user_id from the data layer (and there is no user_id in the data layer, yet), then the variable will return undefined (without quotes). If such variable is used in Google Analytics 4 tags (when value is undefined), this will work fine. GA4 tags will drop that parameter from the request and undefined user id will not be sent.

But if the variable returns a static string (text) or number, such value will still be sent, and it will mess up your data.

 

Can I retroactively fix the historical data in GA4?

No. Once the data has been tracked, it will stay this way. Only after the fix is implemented, the new data will be tracked correctly. Do not hesitate on this.

 

One Total User in GA4 Reports: Final words

To sum up, this issue appears if you are sending a static value as user_id to Google Analytics 4. If a user is not logged in, don’t send something like “none” or “not logged in”.

In this case, a developer should either not push the user_id to the data layer at all, or he/she can send it as undefined (without quotes). It’s also important to note that if “undefined” is pushed with quotes, this is incorrect, too.

Subscribe and Get the Ebook - 20 GA4 mistakes
Julius Fedorovicius
In Google Analytics Tips
0 COMMENTS

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *


 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Google Analytics 4 User ID for cross-device tracking: how to configure it
  • How to Track QR Codes with Google Analytics 4
  • The Magic of Cookies with Google Tag Manager
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings