I am trying to use Google Analytics API, need to get metrics and dimensions list through Google Analytics API.
How to get metrics and dimensions list using Google Analytics API functions in php?
I am trying to use Google Analytics API, need to get metrics and dimensions list through Google Analytics API.
How to get metrics and dimensions list using Google Analytics API functions in php?
If you need the list of dimensions and metrics you can use
analytics.metadata.columns.list
functionality from Google Analytics API v3.You can make a CURL request with PHP like:
https://developers.google.com/analytics/devguides/reporting/metadata/v3/reference/metadata/columns/list?hl=en
This is not available through the API.
the full list of dimensions and metrics is available at the developer.google.com/analytics site:
https://developers.google.com/analytics/devguides/reporting/core/dimsmets
UPDATE 2016-03-26
Since this answer was posted there were some developments in this area and now this is available in an api. I can't delete this answer since it's accepted check the response from @augustin
The Google Analytics Metadata API The Metadata API returns the list and attributes of columns (i.e. dimensions and metrics) exposed in the Google Analytics reporting APIs. Attributes returned include UI name, description, segments support, and more. At this time the response is only metadata for the Google Analytics Core reporting API V3 and the Google Analytics Reporting API v4. Real-time and MCF metadata is not available.