Re: Client ID?

4,359 views
Skip to first unread message

Ronny

unread,
Nov 16, 2012, 3:52:06 AM11/16/12
to google-analytics-m...@googlegroups.com, ShopInOut.com
Hi,
On the same topic, I have my own user id format, and its not UUID
Should it work?
The ID type I am using is BSON::ObjectId (from Mngodb) - example: 50a54505b70f1c0002001a9e

Thanks
Ronny


On Tuesday, November 13, 2012 3:24:24 AM UTC+2, Brad Townsend wrote:
The Client ID field should be a random number in the UUID Version 4 format. 


On Mon, Nov 12, 2012 at 5:19 PM, ShopInOut.com <sant...@shopinout.com> wrote:
Hi,

I was reviewing the reference docs and I don't understand what values I should use for the Client ID parameter. Should it be a random number? Or how do I know what ID each user is supposed to have? 

Thanks

--
 
 

Ronny

unread,
Nov 16, 2012, 3:32:00 PM11/16/12
to google-analytics-m...@googlegroups.com, ShopInOut.com
I understad this point and looking forward to your deployment.
But, can I use the userId format now to populate the clientId field? or is it strict UUID ver 4?

Thanks
Ronny


On Friday, November 16, 2012 8:24:03 PM UTC+2, Brad Townsend wrote:
Hi Ronny,

The clientId field is intended to by an anonymous identifier. This is distinct from the userId field which is used to identify a particular user across devices.

The example identifier from your database would be an excellent userId. However, the User ID feature is still under development and has not yet been enabled for most Universal Analytics web properties. We look forward to making this feature available during this beta and we'll be notifying you as soon as it is ready for testing.

-Brad Townsend
 Google



--
 
 

Ed Brocklebank

unread,
Jun 27, 2013, 7:54:21 AM6/27/13
to google-analytics-m...@googlegroups.com, Ronny, ShopInOut.com
Has userid been made available yet? If so, is it set in the same way as client ID, e.g. 

ga('create', 'UA-XXXXXX-X', {'userId': '1234' });

On Friday, November 16, 2012 8:50:17 PM UTC, Brad Townsend wrote:
We have two acceptable formats for the client ID (&cid) field. Either a UUID Version 4 (recommend) or our legacy anonymous identifier format "X.Y" where X and Y are each random 32-bit numbers. We are planning to discard hits that do not match these formats.


--
 
 

ne...@ucoz.org

unread,
Aug 6, 2013, 7:46:12 AM8/6/13
to google-analytics-m...@googlegroups.com
One question. I need to track events with js && php. To tracjk events from php I need to send Anonymous Client Id(cid). Where I can get it? Or how to set cid in js? How to combine the demands of a php and js with a single client?

ShopInOut.com

unread,
Nov 12, 2012, 8:19:40 PM11/12/12
to google-analytics-m...@googlegroups.com

Brad Townsend

unread,
Nov 12, 2012, 8:24:02 PM11/12/12
to ShopInOut.com, google-analytics-m...@googlegroups.com
The Client ID field should be a random number in the UUID Version 4 format. 

On Mon, Nov 12, 2012 at 5:19 PM, ShopInOut.com <sant...@shopinout.com> wrote:

--
 
 

Shop InOut

unread,
Nov 12, 2012, 8:37:06 PM11/12/12
to Brad Townsend, google-analytics-m...@googlegroups.com
Thanks for the quick response Brad.

I'll set random number for each different user then.

Regards

Brad Townsend

unread,
Nov 16, 2012, 1:23:42 PM11/16/12
to Ronny, google-analytics-m...@googlegroups.com, ShopInOut.com
Hi Ronny,

The clientId field is intended to by an anonymous identifier. This is distinct from the userId field which is used to identify a particular user across devices.

The example identifier from your database would be an excellent userId. However, the User ID feature is still under development and has not yet been enabled for most Universal Analytics web properties. We look forward to making this feature available during this beta and we'll be notifying you as soon as it is ready for testing.

-Brad Townsend
 Google



On Fri, Nov 16, 2012 at 12:52 AM, Ronny <ro...@moment.me> wrote:
--
 
 

Brad Townsend

unread,
Nov 16, 2012, 3:49:56 PM11/16/12
to Ronny, google-analytics-m...@googlegroups.com, ShopInOut.com
We have two acceptable formats for the client ID (&cid) field. Either a UUID Version 4 (recommend) or our legacy anonymous identifier format "X.Y" where X and Y are each random 32-bit numbers. We are planning to discard hits that do not match these formats.


On Fri, Nov 16, 2012 at 12:32 PM, Ronny <ro...@moment.me> wrote:
--
 
 

Nick Mihailovski

unread,
Jun 27, 2013, 12:42:34 PM6/27/13
to google-analytics-m...@googlegroups.com, Ronny, ShopInOut.com
user ID is not yet public and slightly different in how it works from client ID.

-Nick

Александр Максименюк

unread,
Aug 7, 2013, 5:32:14 AM8/7/13
to google-analytics-m...@googlegroups.com
Hi, to set Client ID you have to add this information to
ga('create', 'UA-41503074-1');

So it would look like: 
ga('create', 'UA-41503074-1', {'clientId': '5a021fd5-adab-4f05-a905-cf1083c6cf20'});




вторник, 6 августа 2013 г., 14:46:12 UTC+3 пользователь ne...@ucoz.org написал:

Philippe Gaboury

unread,
Jan 31, 2014, 11:43:07 AM1/31/14
to google-analytics-m...@googlegroups.com, Ronny, ShopInOut.com
Regarding the acceptable formats, would it be acceptable for us to use a standard string for the first 24 digits of the UUID followed by our internal client ID of 8 digits. For example 13bc0492-3b85-4fd6-bb09-96a9XXXXXXXX where XXXXXXXX is replaced by the our internal number, always keeping the same leading portion. Anything else would require an update to our database to store a fully random value.

Thanks.
Message has been deleted

Philip Walton

unread,
Feb 18, 2015, 12:22:40 PM2/18/15
to John Paul Medina, google-analytics-m...@googlegroups.com, ro...@moment.me, sant...@shopinout.com, Brad Townsend
The client ID can be any string as long as it doesn't contain personally identifiable information. The UUID version 4 link listed in the measurement protocol parameter reference goes into detail as to the advantages of that format, but note those advantages are for you and not for GA.

Feel free to use the same client ID that analytics.js generates. GA has no plans to stop supporting it.

On Mon, Feb 16, 2015 at 10:11 AM, John Paul Medina <medina...@gmail.com> wrote:
Hi,

I noticed you said either the UUID Version 4 which is recommended but you also said they legacy anonymous identifier format was also acceptable X.Y which is interesting because I am using the new analytics.js and when I parese the ga(tracker) function I am receiving a legacy clientId and wanted to know if this is correct. I much rather associate it with the ga clientId then generating one on my own. Are you planning on removing the legacy support? 

--
You received this message because you are subscribed to the Google Groups "google-analytics-measurement-protocol" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-measure...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Дмитро Гурешідзе

unread,
Mar 29, 2015, 7:08:37 AM3/29/15
to google-analytics-m...@googlegroups.com
How to get the CID from the cookie "_ga" in the body of html emails? I do not want to generate CID, I want to use an existing cookie "_ga".

Philip Walton

unread,
Mar 30, 2015, 11:27:35 AM3/30/15
to Дмитро Гурешідзе, google-analytics-m...@googlegroups.com
The only way to do this is if you captured the client ID when you asked the user for their email. Emails do not have the ability to run scripts or access cookies.

On Sun, Mar 29, 2015 at 4:08 AM, Дмитро Гурешідзе <dmytro.h...@gmail.com> wrote:
How to get the CID from the cookie "_ga" in the body of html emails? I do not want to generate CID, I want to use an existing cookie "_ga".

--
Reply all
Reply to author
Forward
0 new messages