>

>

GA4 Cross-Device Tracking: From Ghost Users to Real Customers with User-ID

GA4 Cross-Device Tracking: From Ghost Users to Real Customers with User-ID

GA4 Cross-Device Tracking: From Ghost Users to Real Customers with User-ID

GA4 Cross-Device Tracking: From Ghost Users to Real Customers with User-ID

GA4 Cross-Device Tracking: From Ghost Users to Real Customers with User-ID

In the modern digital world, the user journey is non-linear. A user might browse your products on their mobile device during their morning commute, run a detailed comparison on their desktop computer at the office during lunch break, and complete the purchase on their tablet at home in the evening. In the physical world, there is only one person. However, on the analytics side, this scenario often looks like three separate users.

Working with the default setup, Google Analytics 4 recognizes users via Client-ID, which is a device-based identifier. When the device changes, the browser changes, or cookies are cleared, the system perceives the same individual as a new user.

The result of this:

  • User counts that are higher than they actually are

  • Artificially dropped conversion rates

  • Fragmented funnel analyses

  • Incorrect marketing performance evaluation

The data in your analytics panel increases, but the real human inside gets lost.
We can call this the "ghost user" problem.

How Does User-ID Solve This Problem?

User-ID references the person, not the device.
However, the critical point here is that the User-ID is not generated by Google; it is passed from your system.

A unique ID already exists in your database for every logged-in user.

This ID:

  • Must be anonymous

  • Must not make sense when viewed from the outside

  • Must not contain personal data (PII) such as email, phone, or name

Usually, the internal user ID existing in the system is sent directly or hashed with SHA-256.

Step-by-Step Technical Workflow: 

1) Backend (The Source of Identity)

When the user logs in, the unique ID belonging to that user is retrieved on the backend side. This ID is not generated; it already exists in the system.

2) Data Layer (Transmission of Identity)

After login, this value is sent to the dataLayer:

window.dataLayer = window.dataLayer || [];

window.dataLayer.push({

  user_id: "88219"

});

The critical point here is that the User-ID is managed correctly according to the user status.

Sending User-ID Based on User Status (Critical Rule)

The implementation logic recommended by Google is as follows:

  • If the user is not logged in at all → user_id parameter should not be sent.

  • If the user is logged in → the user ID should be sent.

  • If the user has logged out → user_id: null should be sent.

Why is this important?

If the same user_id value continues to be sent after the user logs out, someone else using the same device might be mistakenly matched with the previous user. This leads to serious data corruption.

Sending null at the moment of logout gives a clear signal to GA4:

"This device no longer belongs to that user."

This small detail is of vital importance for data integrity.

3) Google Tag Manager Layer

Google Tag Manager reads the user_id variable in the dataLayer and transfers it to the User-ID field in the GA4 Configuration tag.

Things to consider:

  • The GA4 configuration tag must run on all pages.

  • User-ID should be defined at the configuration level, not on an event basis.

4) GA4 Reporting Identity Setting

The Reporting Identity setting in the Google Analytics 4 Admin panel should be selected as "Blended".

In Blended mode, the order of priority is as follows:

  1. User-ID

  2. Device ID (Client-ID)

In other words, if a User-ID is available, GA4 puts the device ID in the background and performs cross-device stitching using the identifier you sent.

Limits of User-ID

User-ID works only for users who log in.
It does not stitch anonymous visitors.

For this reason:

  • Its impact may be limited on sites with low login rates.

  • Its impact is extremely high on e-commerce, SaaS, and membership-based platforms.

Additionally, User-ID does not stitch historical data retroactively. It ensures data integrity starting from the date it is activated.

Why Is It So Important?

Cross-device tracking is not a technical detail; it is a strategic data architecture.

This way:

  • You see the actual number of users

  • You measure the real conversion rate

  • Funnel analyses gain meaning

  • Customer Lifetime Value (LTV) is calculated more accurately

  • Marketing budget is optimized more soundly

The most dangerous thing in the analytics world is not lack of data, but misleading data because wrong identity stitching generates wrong decisions. And wrong decisions lead to lost budget.

When structured correctly, User-ID transforms the fragmented touchpoints generated by devices into the real journey of a single human being.

And when your method of measurement changes, the reality you see changes too.

Related Post

Related Post

Jul 8, 2026

/

Yazar

Yanlış boyutu yanlış metrikle eşleştirmek ise raporlarınızda yanıltıcı veriler görmenize veya bütçenizi yanlış kanallara yatırmanıza neden olabilir.

Jul 2, 2026

/

Yazar

In this article, we will examine how to create segments in GA4 Explore reports, the Sequence feature within User/Session segments, its differences from standard conditions, and common mistakes.

Jun 5, 2026

/

Yazar

Bu yazıda, Custom HTML tag’lerinin hangi durumlarda kullanıldığını, container’ın neden dolduğunu ve dolmadan önce alınabilecek mimari önlemleri ele alacağız.

Mar 31, 2026

/

Yazar

How do you read the early warning signals in customer behavior? Data-driven churn prevention strategies and actionable action plans.

Jul 8, 2026

/

Yazar

Yanlış boyutu yanlış metrikle eşleştirmek ise raporlarınızda yanıltıcı veriler görmenize veya bütçenizi yanlış kanallara yatırmanıza neden olabilir.

Jul 2, 2026

/

Yazar

In this article, we will examine how to create segments in GA4 Explore reports, the Sequence feature within User/Session segments, its differences from standard conditions, and common mistakes.

Jun 5, 2026

/

Yazar

Bu yazıda, Custom HTML tag’lerinin hangi durumlarda kullanıldığını, container’ın neden dolduğunu ve dolmadan önce alınabilecek mimari önlemleri ele alacağız.