Thanks! Vincent, it worked. I'll follow your suggestion.
Zhen
On Wednesday, August 9, 2017 at 8:35:06 PM UTC-7, Vincent Racaza (AdWords
API Team) wrote:
>
> Hi Zhen,
>
> If you are including a Date segment in your report, you also need to
> include a DURING clause in your report query. Please se
Hi Zhen,
If you are including a Date segment in your report, you also need to
include a DURING clause in your report query. Please see sample code
snippet below:
report_query = ('SELECT Year, Date, DayOfWeek, MonthOfYear, CampaignId,
CountryCriteriaId, CampaignName,'
'CustomerDescript
tiveName, CampaignStatus, AdGroupId ,'
'AverageCost, Clicks, Cost, MostSpecificCriteriaId '
'FROM GEO_PERFORMANCE_REPORT '
'WHERE Year in [2016, 2017]'
)
It works without "Date", but threw the same
gt; you need to include the CountryCriteriaId
> <https://developers.google.com/adwords/api/docs/appendix/reports/geo-performance-report#countrycriteriaid>
> as
> one of your reporting fields so it won't generate an AdWordsReportError.
> You can do something like this
one of your reporting fields so it won't generate an AdWordsReportError.
You can do something like this in your report query:
report_query = ('SELECT CampaignId, *CountryCriteriaId*, Impressions FROM
GEO_PERFORMANCE_REPORT ')
Let me know if the issue persists after doing the s
LoadFromStorage()
query = main(adwords_client)
-------AdWordsReportError
Traceback (most recent call
last) in () 1 adwords_client =
adwords.AdWordsClient.LoadFromStorage('/home/zhge/purchase_journey/gg_api_call/googleads.yaml')>
2 query = main(
LoadFromStorage()
query = main(adwords_client)
-------AdWordsReportError
Traceback (most recent call
last) in () 1 adwords_client =
adwords.AdWordsClient.LoadFromStorage('/home/zhge/purchase_journey/gg_api_call/googleads.yaml')>
2 query = main(