Why I got empty content in CRITERIA_PERFORMANCE_REPORT in python

144 views
Skip to first unread message

sw...@aliyun.com

unread,
Nov 7, 2018, 6:23:22 AM11/7/18
to AdWords API and Google Ads API Forum
Here's code I most copy from the sample(https://developers.google.com/adwords/api/docs/samples/python/reporting#download-a-criteria-performance-report-with-awql)
import sys
from googleads import adwords


def main(client):
# Initialize appropriate service.
report_downloader = client.GetReportDownloader(version='v201809')

# Create report query.
report_query = (adwords.ReportQueryBuilder()
.Select('CampaignId', 'AdGroupId', 'Id', 'Criteria',
'CriteriaType', 'FinalUrls', 'Impressions', 'Clicks',
'Cost')
.From('CRITERIA_PERFORMANCE_REPORT')
.Where('Status').In('ENABLED', 'PAUSED')
.During('LAST_30_DAYS')
.Build())

# You can provide a file object to write the output to. For this
# demonstration we use sys.stdout to write the report to the screen.
report_downloader.DownloadReportWithAwql(
report_query, 'CSV', sys.stdout, skip_report_header=False,
skip_column_header=False, skip_report_summary=False,
include_zero_impressions=True)

if __name__ == '__main__':
# Initialize client object.
adwords_client = adwords.AdWordsClient.LoadFromStorage('googleads.yaml')
main(adwords_client)


After I ran the script, I got these info below:
"CRITERIA_PERFORMANCE_REPORT (Oct 8, 2018-Nov 6, 2018)"
Campaign ID,Ad group ID,Keyword ID,Keyword / Placement,Criteria Type,Final URL,Impressions,Clicks,Cost
Total, --, --, --, --, --,0,0,0

Is that something I missed or type wrong?

sai...@digitaltigers.de

unread,
Nov 7, 2018, 11:03:33 AM11/7/18
to AdWords API and Google Ads API Forum
Hi!

As I understood that kind of reply means that you do not have data ion your account. There are can be different things:
1) Check that you are sending request to the right account: (not Managment account (Test/Prod) it should be exact Testing or Prod customer account)
2) Check that you  have data. I havent work with Criteria Perfomance Report, but at least: Campaing, AdGroup, Ads, Keywords.

Goog luck!!

среда, 7 ноября 2018 г., 12:23:22 UTC+1 пользователь sw...@aliyun.com написал:

Dannison Yao (AdWords API Team)

unread,
Nov 7, 2018, 11:42:45 AM11/7/18
to AdWords API and Google Ads API Forum
Hi there,

Upon reviewing this thread, Saidar is correct in his conclusion that you might not have any data on your account. Make sure that the clientCustomerId you're using is correct when downloading the report.

However, if you validate that there is indeed some data in your account and the API isn't returning anything, please provide your clientCustomerId via reply privately to author so I may look into this.

Sincerely,
Dannison
AdWords API Team
Reply all
Reply to author
Forward
0 new messages