I have some custom reports in GA, I need to get them through API .
reportRequests: [
{
viewId: VIEW_ID,
dateRanges: [
{
startDate: '7daysAgo',
endDate: 'today'
}
],
metrics: [
{"expression": "ga:hOg8OmowQCyxAarL0pWvWg"},
{"expression": "ga:sessions"}
]
}
Where can I find expression for my custom?
I have tried with some Ids like ga:hOg8OmowQCyxAarL0pWvWg, but they all give me this error:
"Unknown metric(s): ga:hOg8OmowQCyxAarL0pWvWg For details see https://developers.google.com/analytics/devguides/reporting/core/dimsmets."