简体   繁体   中英

How can I get google adwords performance data for keyword campaigns split by keyword?

I'm trying to retrieve the individual keyword/query performance report from adwords using the google adwords api across all of our campaigns, but at the moment when I run my query I'm only getting results for queries from our shopping campaigns and I'm confused as to why that would be. The report_query I'm using is as follows

  report_query = (
      'SELECT  AdGroupId, AdGroupName, Keyword, AdGroupStatus, CampaignName, Clicks, Impressions, Cost, Query '  
      'FROM   SEARCH_QUERY_PERFORMANCE_REPORT ' 
      'DURING 20180520,20180522');

  f = open('H:/eCommerce/Business Team/Brad Davis/python/google_keyword_performance.csv', 'wb')


  report_downloader.DownloadReportWithAwql(
      report_query, 'CSV',f, skip_report_header=False,
      skip_column_header=False, skip_report_summary=True,
      include_zero_impressions=True)

Does anyone have any insights into why this might be? Thank you for your help.

Brad

You might try adding a where clause for the ad network. Here's how it's done in PHP.

->where('AdNetworkType1')->equalTo('SEARCH')

The problem was that I had the incorrect account id (or more correctly, I was given the incorrect account id by multiple people before one of them came back to me and corrected it) associated with the .yaml file loaded with the authorization information. Once I fixed that, everything worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM