How are users tracked in Google Analytics and how else to use this tracker

This post refers to Google’s Universal Analytics (which is currently more widely implemented than GA4).

When you visit a site with Google Analytics (GA) installed, a cookie called ga is set in your browser by google which has a string of values. 

What the cookie looks like in your browser.

Each time data is sent to your GA account, this value is included. Universal analytics uses this value to see identify distinct users.  It is commonly referred to a clientID. 

If you did not flush your cookies and visit the same site using the same browser on your iPhone, you are identified as a returning user. 

Things to note:

  • each ga cookie is unique to a browser, an app and a device (so it is not possible to match ga values from different browsers, apps, or different devices)
  • if cookies are cleared, a new cookie with a different value is set

NOTE: Viewing reports by distinct users (clientID) in GA is only available in User Explorer, and if userID is set up (see image). Follow this link to see how to set up userID in your account.

Being only available to view clientID in User Explorer does not allow for this identifier to be used to its potential. To make this value usable in custom reports, you can create a 1st party cookie variable in Tag Manager and pass this to your GA account as a custom dimension with every hit. Links for how to do this found at the bottom of this post.

How to use clientID in reports?

Here is how a simple custom report looking at each clientID and the corresponding number of events associated with it.

This helps give a more granular view of engagement and is especially useful when coupled with data like pages viewed per session or page urls where events were triggered.

Depending on other data points are evaluated with clientID, it becomes invaluable in evaluating objectives like:

  • effectiveness of media campaigns
  • how content is performing
  • site functionality / stickiness of content
  • conversion pathways

Here are just some uses I’ve found particularly useful:

  1. Match visitors by clientID to campaign tracking data & total number of pages viewed to more accurately see how your campaigns are performing.
  2. Match clientID with total number of pages viewed + total number of events + sessions to understand repeat visit behaviour.
  3. Match above report (2) with goal conversions to get a perspective of repeat behaviour and conversion.

Link explaining how to pass clientID to GA using tag manager: 

How to capture Google Analytics Client ID as a custom dimension for user-level insights

Here is the documentation from Google regarding Cookies and User Identification:

If you find the instruction to set up client ID tracking in Google Tag Manager alien or difficult to understand, you may want to engage someone to help implement this. I’m available to engage and you can contact me by following this link.