Hi there,
I am trying to run the below query:
SELECT segments.date, metrics.clicks, metrics.impressions,
metrics.average_cost
FROM ad_group_ad
WHERE segments.date BETWEEN "2023-01-01" AND "2023-04-09"
My results stream returns values for date, clicks and impressions. However,
empty results are returned for average_cost. I'm not getting any error in
the traceback. I can see cost data in my UI Dashboard.
Below is how I'm executing the query. Is there any reason as to why the
average_cost field is returning empty?
client = create_client(access_token)
ga_service = client.get_service("GoogleAdsService")
data_query = f"""
SELECT {fields}
FROM ad_group_ad
WHERE segments.date BETWEEN "{start_date}" AND "{end_date}"
"""
search_request = client.get_type("SearchGoogleAdsStreamRequest")
search_request.customer_id = query.account_id
search_request.query = data_query
stream = ga_service.search_stream(search_request)
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/28b9c0ec-cfb5-4ef4-acb9-0018b641caf6n%40googlegroups.com.