2015-07-23

For Google Analytics, a user is a combination of unique random number and the first time stamp. This combination is called ‘Client ID‘.

Thus Client ID is made up of a unique random number and the first time stamp.

The first time stamp is the time of the first visit by a user or the time when the Google Analytics cookie was first set for the user.

Following is an example of a Client ID: 124562358.46738999

Here, ‘124562358’ is unique random number and ‘46738999’ is the first time stamp.

Client ID is assigned to each unique user of your website/app.

The client Id is set by _ga cookie (which is the Universal Analytics Cookie):



Chrome browser





search for your domain name

_ga cookie is made up of following four fields:

This is what a user looks like to Google Analytics.

The First field is the version number like GA1.

The second field is number of components at the domain separated by dot. By default the _ga cookie is set on the top level domain with the root level (/) path.

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

If you have set up cookie at sub domain level like analytics.optimizesmart.com then the second field would have a value of 3 as there are now 3 components separated by dot. First component is ‘analytics’. Second component is ‘optimizesmart’ and the third component is ‘com’

The third field is random unique ID (randomly generated number). Here 667464943 is the random unique id.

The fourth field is first time stamp i.e. the time when the cookie was first set for the user. Here 1400078288 is the first time stamp.

The third and fourth field together make the client ID. So client ID would be: 667464943.1400078288.

You can retrieve client ID through the ‘ga.getAll‘ method:

var clientId = ga.getAll()[0].get(‘clientId’);

and then send it to Google Analytics by creating a new custom dimension (with session scope):

ga(‘set’, ‘dimension1’,clientId);

How Google Analytics count New and Returning users?

The first time a device (desktop,laptop, smart phone etc) or a browser (like chrome, internet explorer) loads your website content, Google Analytics tracking code creates a random, unique id called the client id and send it to GA server.

This unique id is counted as a new unique user in GA. Every time a new id is detected, GA counts a new user.

When GA detects an existing client ID in a new session, it counts it as a returning user. If the user delete the browser cookies, the ID gets deleted or reset.

If the user switch device or browser on a return visit to your website, a new unique client ID is created and the returning user is counted as a new user, as client ID exist only on the device/browser where it has been set.

That’s why the Client ID cannot be used to measure across devices.

Google Analytics does not report on unique users

Google Analytics does not report on unique users any more.

If you go to Audience > Overview report, you can see a report like the one below:

According to Google owns definition:

The ‘users’ metric include both new and returning users.

So if ‘users’ metric include both new and returning users, then certainly number of users can’t be equal to number of unique users (or unique visitors)

So where are the number of unique users? …….They are missing.

Users != New Users + Returning Users

The total number of users reported by Google Analytics is not equal to the sum of New Users and Returning Users:

This is because Google Analytics also count new users as returning users if they return within the selected time period.

Thus there is an overlap between new and returning users. A new user can also be labelled as returning user by Google Analytics.

Google Analytics does not have any ‘Returning Users’ metric

Google Analytics did not create any metric for returning users. It is missing for no apparent reason. You can only see ‘New Users’ metric in GA:

Google Analytics does not report on number of returning users by default

You need to apply a ‘returning users’ advanced segment to see the number or percentage of returning users

Visitor vs User

While everywhere else Google Analytics is calling website visitors as users, in the ‘New vs. Returning report’ it categorise website visitors as new and returning visitors instead of new users and returning users:

New visitor is same as new user. But in the context of ‘New vs. Returning report’ and technically they are different.

The ‘New Visitor’ is a dimension and ‘New Users’ is a metric.

It seems GA couldn’t come up with a unique name for user type dimensions. Had GA used ‘New user’ as dimension name than it would have become very difficult to differentiate between the ‘New User’ dimension and the ‘New Users’ metric.

A person can be counted as new / returning user more than once

A person can return to your website via different device and/or browser.

Since client ID is not shared between different devices and browsers (by default), same person can be counted as new user or returning user more than once by GA.

Also worth noting is that, Google Analytics uses two different techniques for calculating users. Consequently there can be discrepancies in the users count in different reports. There is also a possibility that same user is counted twice for different source/medium.

For example, If a user visit your website from organic search and then later return to your website via paid search within the selected time period then both organic search and paid search would record visit from the same user.

You need to be aware of these issue while analysing your Users data.

The post Understanding Users in Google Analytics appeared first on Optimize Smart.

Show more