What is Google Analytics Client ID & how it is different from User ID?

What is Google Analytics Client ID?

The Google Analytics Client ID is a combination of a unique random number and the first timestamp (i.e. the time of the first visit). 

Example of a client ID: 1368576646.1596648643

A Client ID represents a unique browser-device pair and is created and assigned by GA4 cookie _ga

This cookie is tied to the specific browser and device combination used to access your website.

This means if a single user visits your site from different devices (phone, laptop, etc.) or browsers (Chrome, Firefox, etc.), they will be assigned a separate Client ID for each browser and device combination.

The _ga cookie is made up of the following four fields:

The ga cookie is made up of the following four fields

The first field is the current version number of the cookie, like GA1.

The second field is the number of components at the domain separated by a dot.

The _ga cookie is set on the top-level domain with the root level (/) path by default. 

So if you have set a cookie at the top-level domain like optimizesmart.com then the second field would have a value of 2 as there are 2 components separated by a dot. One component is ‘optimizesmart’ and the second component is ‘com’.

Similarly, if you have set up a cookie at the sub-domain level, like analytics.optimizesmart.com, then the second field would have a value of 3 as there are now three components separated by a dot. The first component is ‘analytics’. The second component is ‘optimizesmart’. The third component is ‘com’

The third field is a random unique ID (a randomly generated number). Here, 1368576646 is the random unique ID.

The fourth field is the first timestamp, i.e., when the cookie was first set for the user. Here 1596648643 is the first timestamp.

The third and fourth fields together make the client ID. 

So, the client ID would be 1368576646.1596648643

Do you want expert help in setting up/fixing GA4 and GTM?

If you are not sure whether your GA4 property is setup correctly or you want expert help migrating to GA4 then contact us. We can fix your website tracking issues.

GA4 uses Client ID to identify users as new and returning.

GA4 uses Client ID to identify each user of your website.

When someone visits your website, GA4 checks for the presence of the _ga cookie, which stores the Client ID.

If the cookie is found and the Client ID is valid, GA4 recognises the user as returning and starts a new session for that specific browser-device pair.

If the cookie is missing or the Client ID is invalid (e.g., expired cookie, cleared browsing data), GA4 assumes it is a new user and generates a new Client ID for this browser-device combination.

The key thing to remember is that the Client ID is tied to the browser-device pair. One user with multiple devices will have separate Client IDs for each device.

Therefore, GA4 might not be able to capture a single user across different browsers/devices.

You will need to implement User IDs to identify unique users across devices.

Finding client ID via Google developer console

Follow the steps below:

Step-1: Navigate to a web page on your website.

Step-2: Right-click on the web page and then select ‘Inspect’:

Right click on the web page and then select ‘Inspect

You should now see the developer console window like the one below:

see the developer console window

Step-3: Click on the ‘Application’ tab:

Click on the ‘Application tab

Step-4: Expand the ‘Cookies’ dropdown under the ‘Storage’ section:

Expand the ‘Cookies dropdown under the ‘Storage section

Step-5: Click on your domain name to see the list of cookies installed by it:

Click on your domain name to see the list of cookies installed by it

Step-6: Look at the value of the cookie named ‘_ga’. This value contains the client ID:

Look at the value of the cookie named ‘ ga

The value of _ga cookie is: GA1.1.456137084.1711299963

Here, the client ID is: 456137084.1711299963

That’s how you can find client ID via the Google developer console.

Finding client ID in a GA4 property

If you are tracking only the web data stream in your GA4 property and not tracking user IDs, then you can use the dimension ‘Effective user ID’ to find the client IDs.

Follow the steps below to find client IDs in your GA4 property:

Step-1: Login to your GA4 property and click on ‘Explore’:

Login to your GA4 property and click on

Step-2: Click on the ‘Template Gallery’ link to see a full list of all the exploration report templates available.

Click on the ‘Template Gallery link

Step-3: Click on ‘User Explorer’:

Click on ‘User

You should now be able to see the list of client IDs as the values of the ‘Effective user ID’ dimension:

see the list of client IDs as the values of the ‘Effective user ID dimension

Note: If you are tracking both web and app data streams or tracking user IDs, then the ‘Effective user ID’ dimension will not report only on client IDs. 

This is because the ‘Effective user ID’ dimension uses the User ID if one is available; otherwise, it uses the Device ID. The Device ID is either the ‘app instance ID’ for a mobile app or the ‘client ID’ for a website.

You will need to use Google Tag Manager to send client IDs to your GA4 property. 

use Google Tag Manager to send client IDs to your GA4 property

For more details, check out this article: Sending Google Analytics Client ID via GTM (Google Tag Manager).

Key differences between ‘Client ID’ and ‘User ID’:

In the context of GA4, ‘Client ID’ and ‘User ID‘ are not one and the same thing.

Following are the key differences between ‘Client ID’ and ‘User ID’:

Difference #1 

Client ID represents a unique combination of browser and device used to access your website.

A User ID represents a unique identifier for a user, typically obtained from a login system. Thus, a User ID represents a unique user.

Difference #2

Client ID is created and assigned by GA4 cookie _ga. 

User ID is created and assigned by people like me and you.

Difference #3

The Client ID is assigned to a unique browser-device pair, not necessarily a unique user of your website. 

User IDs are generally assigned only to logged-in users.

Difference #4

A Client ID is made up of a unique random number and the first timestamp (i.e. the time of the first visit). For example: 124562358.46738999. 

User ID is made up of alphanumeric characters. It does not include the first timestamp. For example: df45346424

Difference #5

A Client ID can exist only on the device/browser on which it has been set up. Because of this attribute, it cannot be used to measure across devices.

User ID can exist across devices and browsers. Because of this attribute, a User ID can be used to measure across devices.

Difference #6

Client ID cannot accurately identify the number of unique users as a unique user can be counted multiple times when they switch devices/browsers.

User ID can more accurately identify the number of unique users of your website as a unique user is counted only once, even if they switch devices/browsers.

Difference #7

Using client ID creates attribution issues as it exists only on the device/browser on which it was set up. 

Thus you can’t attribute user engagement spread across multiple devices and sessions to a single user in your GA4 reports.

The use of User ID helps in fixing attribution issues as it can exist across devices/browsers. 

Thus you can attribute user engagement spread across multiple devices and browsers to a single user in your GA4 reports.

Difference #8

On a single device/browser, client ID can provide a better picture of the customer purchase journey than User ID, as through the client ID feature, you can track users and their activity from the very first time they visit your website.

Through the User ID feature, you can’t track users and their activity from the very first time they visit your website until they decide to sign up and log in.

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade