apigoogle-analyticsgoogle-analytics-apigoogle-reporting-api

Get ClientId and UserId from Google analytics by Reporting API


I wanna collect all userId and clientId from GA.

I can see userId in dashoboard:

Custom options

but I can't find how get same info from APi for All user. How I can do that with Reporting API?


Solution

  • UserId and ClientID are custom dimensions. So use ga:dimensionXX and replace XX with indexes of your custom dimensions.

    https://ga-dev-tools.appspot.com/dimensions-metrics-explorer/