Search code examples
google-analyticsanalyticsgoogle-analytics-apiweb-analytics

View statistics per client id in google analytics


I want to view the list of distinct client ids which accessed the API and the details for each client id (clicks per page, pages visited, etc.).

Is it possible to view the statistics for each client id in google analytics, from the web interface, or from Reporting API?

Thanks.


Solution

  • If you take your client id for example like this

    ga(function(tracker) {
      var clientId = tracker.get('clientId');
    });
    

    and save it as a custom dimension

    ga('send', 'pageview', {
      'dimension15':  'My Custom Dimension'
    });
    

    You will be able to check the different client id's. There is no way to link a client id back directly to a user as its a random guid created for them. So as far as I know there is nothing against doing this in the rules.

    I have done this with application tracking, I haven't tried it with web tracking but in theory it should be the same.