Hi guys,
we are an agency and under our agency-account, there are a lot of CustomerClients. our API Scripts have to iterate over these Accounts. To only address active used accounts we want to Filter CustomerClients by their Impression during the last 30 days. So I tried to use a GAQL query to get a list of Account-IDs with at least 1 Impression during the last 30 days:
query = ('SELECT customer_client.client_customer, customer_client.resource_name, metrics.impressions FROM customer_client WHERE segments.date DURING LAST_30_DAYS AND metrics.impressions > 0')
Unfortunately, it seems, that customer_client is not able to work with metrics.impressions. The Script returns:
Request made: ClientCustomerId: 5896XXXXXX, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v1.services.GoogleAdsService/Search, RequestId: FXimew-dKfaGgBFv_BfUgQ, IsFault: True, FaultMessage: Cannot select or filter on the following metrics: 'impressions'(could not support requested resources: 'CUSTOMER_CLIENT', 'CUSTOMER_CLIENT'), since metric is incompatible with the resource in the FROM clause or other selected segmenting resources.
Fetching a List with all CustmerClients and than iterating over each of them manually, seems to work, as a request on Customer can handle metrics.impressions. But i think, this is much more time consuming and not a best practice.
So my question is, if i made any mistake, requesting the CustomerClients or if there is really no Feature of filtering by Metrics.