Double-click bid manager v2 create query with groupBys

133 Views Asked by At

I try to create a Google double-click bid manager v2 reporting query. This is how my query payload looks like.

const queryPayload = {
            metadata: {
                title: "Hello world",
                format: "CSV",
                dataRange: {
                    range: "CUSTOM_DATES",
                    customStartDate: {
                        year: '2023',
                        month: '7',
                        day: '30',
                    },
                    customEndDate: {
                        year: '2023',
                        month: '6',
                        day: '30',
                    }
                },
            },
            params: {
                type: 'STANDARD',
                groupBys: ['FILTER_ADVERTISER', 'FILTER_MEDIA_PLAN', 'FILTER_AGE'],
                filters: [
                    {
                        type: 'FILTER_ADVERTISER',
                        value: 'a_id',
                    },
                    {
                        type: 'FILTER_MEDIA_PLAN',
                        value: 'c_id'
                    }
                ],
                metrics: [
                    'METRIC_IMPRESSIONS',
                    'METRIC_CLICKS',
                    'METRIC_MEDIA_COST_USD',
                ],
            },
            schedule: {
                frequency: 'ONE_TIME'
            }
        } 

when I add FILTER_AGE in groupBys I'm getting error like this:

{"error":{"code":400,"message":"The combination of dimensions, metrics, and filters in your report is invalid.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.rpc.RequestInfo","requestId":"123123123123123"}]}}

I can't find anywhere any combination of dimensions, metrics, and filters. Can anyone help about it? Thanks in advance.

0

There are 0 best solutions below