I am having a small problem adding multiple dimensions to the API
request for Search Console.
If I add the following to group by country
it works fine.
$filters->setDimension("country");
$filters->setOperator("equals");
$filters->setExpression($country);
$filter->setFilters($filters);
$filter->setFilters(array($filters));
$request->setDimensionFilterGroups(array($filter));
But if I add another dimension below for device, it skips the country
dimension and only runs the query with the device dimension. It's perfectly possible to run both according to this on the search console API
site:
'filters': [{
'dimension': 'country',
'expression': 'ind'
}, {
'dimension': 'device',
'expression': 'MOBILE'
}]
So, any idea how I can use them both on a query?
It's probably simply some PHP code
, but I can't find any documentation on multiple dimensions or any examples anywhere with PHP
in mind.