3

we are seding requests like this throught the google analytics measurement protocol to track user interaction there. For us its important to be to link a interaction to a specific user so we where happy to be able to set the "cid" attribute of the protocol.

my problem is that I cannot find this Client ID somewhere inside the reports of google analytics. Even when customizing the reports I cannot find a Dimension which allows me to display this information.

http://www.google-analytics.com/collect?
 v=1             // Version.
 &tid=UA-XXXX-Y  // Tracking ID / Property ID.
 &cid=555        // Anonymous Client ID.

 &t=event        // Event hit type
 &ec=video       // Event Category. Required.
 &ea=play        // Event Action. Required.
 &cm18=8000
 &cd6=crocodile

Do you have an idea of how the cid could be found there?

Mik
  • 1,705
  • 1
  • 14
  • 26
  • 2
    I think you need to send it as a custom dimension if you want to be able to see it. There doesn't appear to be a way to see client id or user id. – Linda Lawton - DaImTo Oct 20 '14 at 09:06
  • thanks, custom dimension seems to be the right thing actually... but in the above example I cannot make the system showing them up... I just added a &cd1=12345 param to the request... do you know if there is another way of doing this? – Mik Oct 20 '14 at 10:24
  • remember its probably going to take 24 - 48 hours to show up in the standard report if you just sent that now. – Linda Lawton - DaImTo Oct 20 '14 at 11:22

1 Answers1

0

Client id is assigned to a user(client) viewing your site by google analytics. Here is an example of how you can get the client id if you're using jQuery.

$(document).ready(function() {
  setGaClientId();
});

var setGaClientId = function(){
  if(typeof(ga) != 'undefined'){
    ga(function(tracker) {
      console.log(tracker.get('clientId')); //actually do something here
    });
  }
}
Calvin
  • 1,056
  • 8
  • 5