php-docs-samples icon indicating copy to clipboard operation
php-docs-samples copied to clipboard

dimension_filter, order_by & metric_filter Are Not Working in BetaAnalyticsDataClient runReport

Open huuvan20 opened this issue 2 years ago • 0 comments

I use the dimension_filter, which does not filter anything in the response.

'dimension_filter' => new FilterExpression([
    'filter' => new Filter([
        'field_name' => 'pagePath',
        'string_filter' => new StringFilter([
            'match_type' => MatchType::CONTAINS,
            'value' => 'can-youtube-tv-be-shared',
        ]),
    ]),
]),

I tested with the same parameters again in APIs Explorer. And it works properly as below: https://developers.google.com/analytics/devguides/reporting/data/v1/rest/v1beta/properties/runReport

Screen Shot 2023-03-08 at 14 18 01

huuvan20 avatar Mar 08 '23 07:03 huuvan20