Google Ads script and Adwords API results are different for the same account

176 views
Skip to first unread message

İlkin Balkanay

unread,
Jun 15, 2019, 4:25:07 PM6/15/19
to AdWords API and Google Ads API Forum
Hi
Our API token was approved last week for basic access.
We are trying to re-implement our google ads scripts with the python sdk using Adwords API.
For some customerIds we can pull data with google ads scripts, but when we use Adwords API(python) 
for the same customerIds empty result is returned.

Has anybody experienced a similar problem?

Thank you

ilkin

Google Ads API Forum Advisor Prod

unread,
Jun 16, 2019, 10:45:29 PM6/16/19
to adwor...@googlegroups.com

Hi,

Thanks for reaching out.

To further investigate the issue, would you mind providing the complete SOAP request and response logs together with customer ID via Reply privately to author? If you haven't enabled the SOAP logging yet, you can enable it by following this guide for Python client library.

Also, would you be able to provide the result that has been generated through Google Ads scripts and the name of the script so I can check it as well?

Regards,
Ejay
Google Ads API Team



ref:_00D1U1174p._5001UBnYB7:ref

Google Ads API Forum Advisor Prod

unread,
Jun 18, 2019, 10:33:29 AM6/18/19
to il...@peak.com, adwor...@googlegroups.com
Hi, 

I'm Ejay's colleague addressing your concern on his behalf. I was able to check the shared details. Could you please confirm if your concern is about the Keywords Performance Report not returning the details? If so, it looks like you are generating the report for LAST_7_DAYS. Please note that the account currently has Search, Display, Video and Universal App Campaigns. The Universal App Campaigns currently does not support Keywords Performance Report so this data will not returned. The last 7 days metrics for the other campaigns are zeros. You could set the includeZeroImpressions field to true to get the keywords data for other campaigns.

Let me know if you have any other questions.

Thanks,
Bharani, Google Ads API Team
 

ref:_00D1U1174p._5001UBnYB7:ref

İlkin Balkanay

unread,
Jun 19, 2019, 5:28:33 AM6/19/19
to adsapifor...@gmail.com, adwor...@googlegroups.com
Hi Bharani
Thank you very much for your reply

My concern here is, google ads script returns Keyword performance reports but python api does not.

What I am trying to do is reimplementing google ads scripts in python. Here is the ads script that I use for testing:
As I said in my previous email, this script is named as   "
adwords_test_ilkin"   
https://ads.google.com/aw/bulk/scripts/edit?ocid=76814069&scriptId=3402497&__u=4058262925&__c=1284189581&authuser=2. When I run this ads script I can see in the logs that the query "SELECT .... FROM KEYWORD_PERFORMANCE_REPORT ....." returns results.


function main() {
var accountIterator = AdsManagerApp.accounts().withIds(['336-647-2162']).get();

while (accountIterator.hasNext()) {
      var account = accountIterator.next();
      AdsManagerApp.select(account);
     
      var accountName = account.getName() ? account.getName() : '(Unknown)';

      var client_id = account.getCustomerId();

      Logger.log("Starting report for " + accountName + " " + client_id);

      var report = AdWordsApp.report(
          'SELECT Date, CampaignId, CampaignName, AdGroupId, AdGroupName, Clicks, Cost, Conversions, AccountCurrencyCode, Id, Criteria, KeywordMatchType, AccountTimeZone, AllConversions, Impressions ' +
          'FROM   KEYWORDS_PERFORMANCE_REPORT ' +
          'WHERE  Cost > 0 ' +
          'DURING LAST_7_DAYS');

      var rows = report.rows();
      while (rows.hasNext()) {
          var row = rows.next();
          Logger.log(row['Date'] + '\t' + row['CampaignId'] + '\t' + row['Criteria'] + '\t' + row['KeywordMatchType'] + '\t' + row['Clicks'] + '\t' + row['Cost']);
      }
      Logger.log("Ended report");      
    }
}



But when I try to run the same query "SELECT .... FROM KEYWORD_PERFORMANCE_REPORT ....."  with the python sdk, the API does not return anything. (includeZeroImpressions is set to True) I have already attached python sdk logs, soap messages in the previous messages. Do you need  any other information for further debugging this issue?


Best regards.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/Av8IWfDVKsw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/L9eWL000000000000000000000000000000000000000000000PTATRA00s2GxXRykRAq7OHhk-Ic7FA%40sfdc.net.

Google Ads API Forum Advisor Prod

unread,
Jun 19, 2019, 9:54:21 AM6/19/19
to il...@peak.com, adwor...@googlegroups.com
Hello, 

The shared Python logs indicate that the includeZeroImpressions field is set to false. Could you please set this to true and share the report definition if you are still having an issue?

İlkin Balkanay

unread,
Jun 19, 2019, 10:51:10 AM6/19/19
to adsapifor...@gmail.com, adwor...@googlegroups.com
Hi Bharani
I am attaching the python logs with the includeZeroImpressions param is set to True.
Still not getting any result for clientCustomerId': '3366472162'.

And here is the report query:

cols = ['Date', 'CampaignId', 'CampaignName', 'AdGroupId', 'AdGroupName', 'Clicks', 'Cost', 'Conversions',
        'AccountCurrencyCode', 'Id', 'Criteria', 'KeywordMatchType', 'AccountTimeZone', 'AllConversions',
        'Impressions']
report_query = (adwords.ReportQueryBuilder()
                .Select(",".join(cols))
                .From('KEYWORDS_PERFORMANCE_REPORT')
                .Where('Cost').GreaterThan(0)
                .During('LAST_7_DAYS')
                .Build())


Thank you

ilkin

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api...@googlegroups.com
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 a topic in the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adwords-api/Av8IWfDVKsw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adwords-api...@googlegroups.com.
python_sdk_logs.txt
Reply all
Reply to author
Forward
0 new messages