Hello,

I try to get a report campaign with column "metrics.invalid_clicks", but it 
return an error,  could you look this error ? please

Page support: 
https://developers.google.com/google-ads/api/docs/migration/mapping#campaign_performance

you can find " metrics.invalid_clicks" is available for "campaign"

thanks for your reply.

ERROR LOG:

[2021-10-01T11:04:45.961064+02:00] google-ads.WARNING: Request made: Host: 
"googleads.googleapis.com", Method: 
"/google.ads.googleads.v8.services.GoogleAdsService/SearchStream", 
CustomerId: 5537212111, RequestId: "FU6BqZ2G3YZtwZnWfj5t4w", IsFault: 1, 
FaultMessage: "["Cannot select the following segments because at least one 
unsupported metric is found in SELECT or WHERE clause: 
'segments.device'(unsupported metrics: 'invalid_clicks')."]"  
[2021-10-01T11:04:45.961858+02:00] google-ads.NOTICE: Request
-------
Method Name: /google.ads.googleads.v8.services.GoogleAdsService/SearchStream
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/7.4.23 gapic\/ gax\/1.9.0 grpc\/1.25.0 
rest\/1.9.0",
    "x-goog-request-params": "customer_id=5537212111",
    "developer-token": "REDACTED",
    "login-customer-id": "2839567378"
}
Request: 
{"customerId":"5537212111","query":"\n            SELECT\n                
segments.date,\n                segments.device,\n                
campaign.id,\n                campaign.name,\n                
metrics.impressions,\n                metrics.clicks,\n                
metrics.cost_micros,\n                
customer.currency_code,\n                customer.id,\n               
metrics.invalid_clicks\n            FROM campaign\n            WHERE 
segments.date DURING YESTERDAY\n        "}

Response
-------
Headers: {
    "request-id": "FU6BqZ2G3YZtwZnWfj5t4w",
    "date": "Fri, 01 Oct 2021 09:04:47 GMT",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; 
ma=2592000,h3-T051=\":443\"; ma=2592000,h3-Q050=\":443\"; 
ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; 
ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: 
{"errors":[{"errorCode":{"queryError":"PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE"},"message":"Cannot
 
select the following segments because at least one unsupported metric is 
found in SELECT or WHERE clause: 'segments.device'(unsupported metrics: 
'invalid_clicks')."}],"requestId":"FU6BqZ2G3YZtwZnWfj5t4w"}  
Request with ID 'FU6BqZ2G3YZtwZnWfj5t4w' has failed.
Google Ads failure details:
    query_error: Cannot select the following segments because at least one 
unsupported metric is found in SELECT or WHERE clause: 
'segments.device'(unsupported metrics: 'invalid_clicks').

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ad739f2f-8bf4-4624-8a44-c578cc2d926an%40googlegroups.com.

Reply via email to