WebmasterID logoWebmasterID
Event tracking

Client ID vs user ID on events

Every GA4 event is associated with a client/instance identifier that distinguishes a browser or app instance, set automatically. A user ID is a separate, optional identifier you assign to authenticated users so their events join across devices. The two answer different questions: device/instance continuity versus cross-device identity. This page explains how each attaches to events and why user ID demands extra privacy care.

Verified against primary sources

Two identity spaces

GA4 attaches a client_id (web) or app instance id to every event automatically, identifying the browser or app install (GA4 developer docs). Separately, you may set a user_id — your own pseudonymous key for a signed-in user — which lets GA4 associate that user's events across devices and sessions. Client ID is device/instance scope; user ID is person scope across devices.

When and how to use user ID

Use user ID when you genuinely need cross-device, signed-in measurement and can assign a stable, non-personal key. It must never be an email, name, or other PII — only a pseudonymous identifier — and it carries heavier consent and governance obligations than the automatic client ID. If device-level analysis suffices, the default client ID alone is simpler and lower-risk. Match the identifier to the question, not the maximum tracking possible.

How it appears in analytics and logs

The same person counted as multiple users across devices means only client ID is in use; user ID, when set consistently, unifies their events across devices.

Diagnostic use case

Decide whether device-level (client ID) measurement is enough or you need cross-device joining via an assigned user ID, and attach the right identifier to events.

What WebmasterID can help detect

WebmasterID's cookieless model avoids persistent cross-device identity by default; GA4's client-ID-vs-user-ID model is documented here for comparison.

Common mistakes

Privacy and accuracy notes

Client ID identifies an instance, not a named person; user ID is a stronger identifier and must be a non-PII pseudonymous key with proper consent. This is educational, not legal advice.

Related pages

Sources and verification notes

Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.