Universal Analytics clientId vs userId
Asked Answered
G

3

5

The docs describe the clientId as:

This anonymously identifies a particular user, device, or browser instance. https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters#cid

It can be used to send server side hits to analytics while still tying them to a particular user.

There is also a feature in closed beta called userId, which you will be able to pass once a user has authenticated: https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id

userId is fairly self-explanatory. However, UA also allows you to pass your own clientid if you choose to. For developing CRM type tools, can one just associate the clientid with a user in the same way that you would with a userid? The goal is primarily to be able to track offline interactions and connect them with visitors in Analytics.

Gynaeco answered 12/3, 2014 at 13:48 Comment(1)
To confuse things a little more Google Analytics Academy talks about a unique device id (as opposed to either user or client id) and says that it can be manually set to identify users over different devices: analyticsacademy.withgoogle.com/course02/… (about 01:35 in the video). There seems to be a a bit of a documentation Snafu and I suggest the first one to actually tests what works in which way leaves a comment/answer here :-)Ephram
K
6

maembe,

clientID is a random number generated by Google Analytics, and keep in mind it's always required and its value should always be a random UUID (version 4) (you could technically use your own, but I am not sure how practical and reliable this would be). Most importantly, you can easily access it with predefined get function (see documentation).

For your needs, this is exactly what you should do -- if someone sings ups, store ClientID in your CRM and then if there is any offline purchase, record the transactions with measurement protocol using the stored clientID. Google Analytics will then make the link (attribution) with that visitor and you will see this in your reports. Also, take advantage of newly available custom metrics and dimensions which can store pretty much anything you want (think of customer segmentation etc.). Beware of storing PII though.

Hope this helps :)

I am curious how UserID is going to work, it might change everything, but for now, I wouldn't rely on it as there is very little information available.

Katharyn answered 13/3, 2014 at 15:4 Comment(2)
Thanks for the answer Petr. However, you can actually pass in your own uuid as a clientID, however, we will probably end up doing what you're saying, capture the clientid on sign up and working from there. developers.google.com/analytics/devguides/collection/…Gynaeco
Thanks, I will correct my answer about the possibility of using your own ClientID.Katharyn
D
3

This Analytics support page now states the differences between Client ID and User ID - https://support.google.com/analytics/answer/6205850?hl=en#clientid-userid

Essentially client IDs represent unauthenticated users, and are automatically randomly generated.

User IDs represent authenticated users, and must be set manually.

Client-ID vs User-ID screenshot It's worth noting that user IDs cannot be things like an email address, or other data that would allow Google to identify the user

  • You will not upload any data that allows Google to personally identify an individual (such as certain names, Social Security Numbers, email addresses, or any similar data), or data that permanently identifies a particular device (such as a unique device identifier if such an identifier cannot be reset).
  • If you upload any data that allows Google to personally identify an individual, your Google Analytics account can be terminated, and you may lose your Google Analytics data.

Taken from: https://developers.google.com/analytics/devguides/collection/protocol/policy

Denotation answered 22/6, 2017 at 8:47 Comment(0)
R
2

I'd imagine User ID is designed to differentiate the behavior of an authenticated user. here

Righthand answered 26/9, 2014 at 15:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.