I’m trying to sort a question that is based around Google Analytics, the JSON looks like this:
{
“ids”: “ga:1234567”,
“start-date”: “2005-01-01”,
“end-date”: “today”,
“metrics”: “ga:totalEvents”,
“dimensions”: “ga:eventLabel”,
“sort”: “ga:eventLabel”,
“filters”: “ga:eventLabel=@foo”,
“include-empty-rows”: false,
“max-results”: 2000
}
This results in an ascending row chart, but I would prefer to have it descending, how do I change the sort order?
I have tried to follow the GA API but the following doesn’t work either:
{
“ids”: “ga:1234567”,
“start-date”: “2005-01-01”,
“end-date”: “today”,
“metrics”: “ga:totalEvents”,
“dimensions”: “ga:eventLabel”,
“orderBys”:[
{
“sortOrder”: “DESCENDING”,
“fieldName”: “ga:totalEvents”
}
],
“filters”: “ga:eventLabel=@foo”,
“include-empty-rows”: false,
“max-results”: 10
}