Hi,
I'm making a query for ad_group_ad and for some reason, the segmentation is
including fields I did not query for. Specifically, I'm getting back
keyword.ad_group_criterion.
This is my query:
SELECT
ad_group_ad.ad.id,
ad_group_ad.ad.name,
ad_group_ad.ad.type,
ad_group.id,
ad_group.name,
ad_group.status,
ad_group.type,
campaign.id,
campaign.name,
segments.date,
segments.keyword.info.text,
metrics.impressions,
metrics.clicks,
metrics.conversions,
metrics.conversions_value,
metrics.interactions,
metrics.cost_micros
FROM ad_group_ad
WHERE segments.date DURING {'LAST_30_DAYS' if long_lookback else
'TODAY'}
AND ad_group.type != SHOPPING_SMART_ADS
ORDER BY segments.date
and this is the first row of my results:
campaign {
resource_name: "customers/5484439197/campaigns/14042339226"
name: "Leads-Search-1"
id: 14042339226
}
ad_group {
resource_name: "customers/5484439197/adGroups/127758315960"
status: ENABLED
type_: SEARCH_STANDARD
id: 127758315960
name: "Main_Ad_Group"
}
metrics {
clicks: 0
conversions_value: 0.0
conversions: 0.0
cost_micros: 0
impressions: 2
interactions: 0
}
ad_group_ad {
resource_name: "customers/5484439197/adGroupAds/127758315960~535905305969"
ad {
type_: RESPONSIVE_SEARCH_AD
resource_name: "customers/5484439197/ads/535905305969"
id: 535905305969
}
}
segments {
keyword {
info {
text: "ecommerce metrics"
}
ad_group_criterion:
"customers/5484439197/adGroupCriteria/127758315960~91570650"
}
date: "2022-05-06"
}
Why am I getting this extra segment, and how do I stop getting it? I tried
adding the line
PARAMETERS omit_unselected_resource_names = true
to the end of the query, but I got this error:
WARNING:google.ads.googleads.client:Request made: ClientCustomerId:
5484439197, Host: googleads.googleapis.com, Method:
/google.ads.googleads.v8.services.GoogleAdsService/SearchStream, RequestId:
EuINCwMyKDUUzT6xWCTTeA, IsFault: True, FaultMessage: Invalid parameter name
cannot be included in PARAMETERS clause: 'omit_unselected_resource_names'.
ERROR:root:Exception: (<_SingleThreadedRendezvous of RPC that terminated
with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string =
"{"created":"@1651855789.324534000","description":"Error received from peer
ipv4:142.250.72.202:443","file":"src/core/lib/surface/call.cc","file_line":1075,"grpc_message":"Request
contains an invalid argument.","grpc_status":3}"
>, <_SingleThreadedRendezvous of RPC that terminated with:
status = StatusCode.INVALID_ARGUMENT
details = "Request contains an invalid argument."
debug_error_string =
"{"created":"@1651855789.324534000","description":"Error received from peer
ipv4:142.250.72.202:443","file":"src/core/lib/surface/call.cc","file_line":1075,"grpc_message":"Request
contains an invalid argument.","grpc_status":3}"
>, errors {
error_code {
query_error: BAD_PARAMETER_NAME
}
message: "Invalid parameter name cannot be included in PARAMETERS clause:
\'omit_unselected_resource_names\'."
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"Google Ads API and AdWords 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/aaeed803-a9c2-4b35-a11c-f6e7e91c5060n%40googlegroups.com.