Client ID vs User ID in GA4 on Shopify

Client ID vs User ID in GA4 on Shopify

TL;DR

GA4 runs on two identifiers that do different jobs. The Client ID answers "is this the same browser," and it lives in the _ga cookie, which GA4 also calls the device ID [1]. The User ID answers "is this the same person," and you set it yourself at login so GA4 can connect a buyer across their phone and laptop [2]. The Measurement Protocol, which Shopify apps use to send server-side purchases, requires a client_id on web streams and treats user_id as optional [3]. The practical Shopify problem is identity: if a server-side order does not carry the browser's Client ID, GA4 opens a fresh session and attributes the sale to direct/none. That is the identifier-level cause behind the "logged-in order shows as Direct" symptom. WeltPixel Conversion Tracking carries the browser Client ID into the server purchase event so the order stitches to the right session, and it deliberately does not send a GA4 User ID. This piece explains both IDs, the reporting identity setting that decides which one GA4 uses, and where to verify your own values.

Key Takeaways

  • The Client ID is per-browser and comes from the _ga cookie; GA4 treats it as the device ID in its reporting identity stack [1].
  • The User ID is your own cross-device login key, set at sign-in, capped at 256 characters, and never allowed to contain PII like an email [2].
  • GA4's reporting identity setting (Blended, Observed, or Device-based) decides which identifiers GA4 is allowed to use, and User ID only appears under Blended or Observed [4].
  • The Measurement Protocol requires a client_id on web streams; user_id is optional and additive, not a replacement [3].
  • A logged-in Shopify order can still land in Direct when the server event carries a fresh Client ID instead of the browser's, because GA4 then opens a new session with no campaign context.
  • WeltPixel Conversion Tracking carries the browser Client ID into the server-side purchase, and deliberately does not send a GA4 User ID.

What is the GA4 Client ID?

The Client ID is GA4's answer to one question: is this the same browser I have seen before? When a visitor first loads your storefront, GA4 writes a _ga cookie and stores a Client ID inside it. Every event from that browser carries the same value, which is how GA4 groups page views, add-to-carts, and a purchase into one session and one device.

GA4's documentation is explicit that on websites the device ID derives its value from the Client ID, and that Client ID lives in the _ga cookie [1]. So when you read "device ID" in GA4's reporting settings, that is the Client ID for web traffic. It is scoped to one browser on one device. Open your store in Chrome and then in Safari and you are two Client IDs, even though you are one human.

That scoping is the root of most Shopify attribution confusion. The Client ID does not follow a person. It follows a browser. It resets when cookies are cleared, when a different browser is used, or when a tracking-prevention feature blocks the cookie from persisting. None of that is a bug. It is the defined behavior of a per-device identifier.

What is the GA4 User ID, and how is it different?

The User ID is the identifier you bring. GA4 describes it as a way to associate your own identifiers with individual users so you can connect their behavior across different sessions, devices, and platforms [2]. On Shopify that own-identifier is usually the customer ID assigned when someone logs in. Once you send it, GA4 can join the same person's laptop session and phone session into a single user, which the Client ID alone can never do.

The User ID comes with hard rules. It must be 256 characters or fewer [2]. It must not contain anything a third party could use to identify the person, so no emails and no names [2]. You have to reassign it consistently every time that user logs in, and sending blank or dummy values causes inaccurate data, including permanent data loss [2]. It is also not retroactive, so it only stitches activity from the point you start sending it forward [2].

Here is the side-by-side that settles most of the confusion.

Property Client ID User ID external_id (Meta/TikTok)
Scope One browser on one device One person across devices One person, ad-platform match
Source _ga cookie, set by GA4 You set it at login Customer ID, hashed
Question it answers Same browser? Same person? Match to an ad account user
Set by whom GA4 automatically Your site, on login The tracking app, server-side
Required by GA4 MP? Yes, on web streams [3] No, optional [3] Not a GA4 field at all
Cross-device? No Yes Yes, inside Meta/TikTok

The right column matters because it is the easiest field to confuse with the User ID. The hashed external_id that ad platforms use for matching is a Meta and TikTok concept, not a GA4 one. It travels on a completely separate path. A customer ID showing up as external_id in your Meta events says nothing about whether GA4 received a User ID.

How GA4 reporting identity stitches them

You do not get to assume GA4 uses both IDs. A single account setting, the reporting identity, decides which identifiers GA4 is allowed to draw on. There are three modes, and the wording is GA4's own [4].

Blended uses, in order, the User ID, then the device ID, then modeling, and if no identifier is available GA4 uses modeling to fill the gap [4]. Observed uses the User ID, then the device ID, with no modeling [4]. Device-based uses only the device ID and ignores all other IDs that are collected [4].

The consequence is direct. If your account is set to Device-based, any User ID you send is thrown away in reporting, because that mode looks only at the Client ID. User ID is only visible in reports when reporting identity is Blended or Observed [4]. So a store can be sending a perfect User ID and see nothing change, simply because the reporting identity is set to ignore it. Check that setting before you spend a day debugging a User ID implementation.

Why a logged-in Shopify order can still show as Direct

This is where the two IDs meet the real Shopify failure. The browser pixel sets a Client ID and builds the session that holds the campaign that drove the visit. When the order completes, the purchase is confirmed server-side, and the server-side event has to carry that same browser Client ID to land in the same session. If it carries a different value, GA4 has no way to know the two are related, so it opens a new session with no referrer and files the revenue under direct/none.

WeltPixel Conversion Tracking handles the matching part. It captures the Client ID the browser pixel wrote and carries it through to the server-side purchase event, so the order joins the same GA4 session and user the browser built. That is the whole point of the browser-to-server bridge.

The bridge cannot always find a Client ID. Some orders never carry the browser's _ga value: admin-created orders, some Shop Pay cross-domain checkouts, subscription renewals, and visitors who declined the tracking cookie. When the browser Client ID is missing, WCT still sends the purchase with a fallback identifier rather than dropping it, so revenue is recorded. The trade-off is that the fallback does not match any browser session, so GA4 opens a fresh server-side session attributed to direct/none.

That is the identifier-level cause of the symptom covered in why Shopify marks logged-in and cross-device orders as Direct. The same missing-Client-ID condition is what produces unattributed revenue in GA4 (not set) unattributed orders. For the transport that actually carries the Client ID to the server, the GA4 Measurement Protocol explainer covers how the server-side send works.

Worth knowing for 2026: Google is moving in the same direction the bridge already does. A February 2026 Measurement Protocol changelog added support for accepting a Client ID cookie for client_id and a session ID cookie for session_id [3], which is exactly the cookie-to-server passthrough that keeps a purchase in its original session.

Should you send a GA4 User ID from Shopify?

User ID is a real GA4 capability, and configuring it is a legitimate choice. It is the only way to join a logged-in buyer across devices, and for stores with heavy repeat purchasing that cross-device view can be worth the setup. The broader case for passing a customer identifier into GA4 is covered in first-party cookies and customer identity on Shopify.

WeltPixel Conversion Tracking made a different call. It does not send a GA4 User ID. In our own testing, attaching a User ID to server-side purchase events was observed to push attribution toward (not set), so the app relies on a correctly bridged Client ID instead of layering a User ID on top of it. That is a behavior we measured, not a Google-published rule, and the historical record shows server-side User ID and attribution have been a finicky pairing in the past.

To be clear about where the customer ID does go: WCT carries the logged-in customer ID to Meta and TikTok as a hashed external_id for ad-platform matching. That is a different field on a different path, and it is not a GA4 User ID. If you see the customer ID in your Meta events, that is external_id doing its job, and it tells you nothing about GA4.

The practical takeaway is that a correctly bridged Client ID does the heavy lifting on Shopify. If you want cross-device user reporting, you can configure User ID yourself, but verify your attribution does not degrade after you turn it on, because that is the exact failure WCT chose to avoid.

How to check your own Client ID and User ID in GA4

You do not have to guess at any of this. Three places in GA4 show you the truth.

First, confirm your reporting identity. In GA4, open Admin → Data display → Reporting identity and note whether you are on Blended, Observed, or Device-based. If you are on Device-based, User ID will never appear in reports no matter what you send [4].

Second, use DebugView. With debug mode on, you can watch live events arrive and inspect whether a client_id is present and whether a user_id field is attached. This is the fastest way to confirm a server-side purchase carried the browser's Client ID rather than a fresh one.

Third, open the User Explorer report. Under Blended or Observed reporting identity, it lists users by their identifier, which lets you spot whether a logged-in buyer is being tracked as one stitched user or fragmented across multiple device-only records.

If you only have time for one check, make it the reporting identity setting. It silently controls everything else, and a wrong setting there makes every other test misleading.

FAQ

Is the Client ID the same as the User ID?

No. The Client ID identifies a browser and comes from the _ga cookie automatically [1]. The User ID identifies a person and is something you set at login [2]. One device with two logged-in family members is one Client ID and two User IDs.

Does GA4 require a Client ID?

Yes, on web streams. The Measurement Protocol requires a client_id to attribute an event to a web stream, while user_id is optional and additive [3]. App streams use a different identifier scheme entirely [3].

Why is my logged-in order still showing as Direct?

Almost always because the server-side purchase carried a fresh Client ID instead of the browser's. GA4 then cannot connect it to the original session, so it files the revenue under direct/none. The mechanics are in why Shopify marks logged-in and cross-device orders as Direct.

Should I send a GA4 User ID on Shopify?

You can, and it is the only way to get cross-device user reporting. WCT does not, because it observed User ID on server-side events pushing attribution toward (not set), and it relies on a bridged Client ID instead. If you enable User ID yourself, verify your attribution holds afterward.

Where do I find my Client ID in GA4?

Use DebugView to inspect a live event's client_id, or look at the User Explorer report under Blended or Observed reporting identity. The raw value also lives in the _ga cookie in your browser's storage [1].

Carry the right Client ID into every server-side sale

Client ID and User ID decide whether GA4 sees one customer or three. WeltPixel Conversion Tracking carries the browser Client ID into the server-side purchase so the sale stitches to the right session instead of landing in direct/none, across GA4, Meta, TikTok, Google Ads, and Reddit with shared event deduplication.

Install WeltPixel Conversion Tracking on the Shopify App Store

Sources

  1. Google Analytics Help. "[GA4] Device ID." https://support.google.com/analytics/answer/9356035
  2. Google Analytics Help. "[GA4] Measure activity across platforms with User-ID." https://support.google.com/analytics/answer/9213390
  3. Google Analytics for Developers. "Measurement Protocol (Google Analytics 4)" and changelog. https://developers.google.com/analytics/devguides/collection/protocol/ga4
  4. Google Analytics Help. "[GA4] Reporting identity." https://support.google.com/analytics/answer/10976610

Ready to upgrade your tracking?

Server-side tracking for Magento and Shopify — accurate data, better attribution, full privacy compliance.