Adwords download some customer_id report, get zero files but UI is not

94 views
Skip to first unread message

Gen Xin

unread,
Nov 4, 2020, 10:07:13 PM11/4/20
to AdWords API and Google Ads API Forum
When i use  Adwords API to download some customer_id Ad report. In the UI, we see data. However using API to download, we will get zero files. Could you help me check this problme?

Code is here:

/** input parameters: 

      reportFields: report fileds

      customerId: customerId

      dateRange: report start date & end date

**/

 

public void downloadAdReport(AdWordsSession session, DateRange dateRange , String customerId, ArrayList reportFields) throws Exception {

 

    Selector selector = new Selector();

    selector.setDateRange(dateRange);

    selector.getFields().addAll(Lists.newArrayList(reportFields));

    ReportDefinition reportDefinition = new ReportDefinition();

    reportDefinition.setReportName("Criteria performance report #" + System.currentTimeMillis());

    reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.CUSTOM_DATE);

    reportDefinition.setReportType(ReportDefinitionReportType.AD_PERFORMANCE_REPORT);

    reportDefinition.setDownloadFormat(DownloadFormat.CSV);

    reportDefinition.setSelector(selector);

    ReportingConfiguration reportingConfiguration =

            new ReportingConfiguration.Builder()

                    .skipReportHeader(true)

                    .skipColumnHeader(true)

                    .skipReportSummary(true)

                    .includeZeroImpressions(false)

                    .build();

    session.setReportingConfiguration(reportingConfiguration);

    session.setClientCustomerId(customerId);

    ReportDownloadResponse response = new ReportDownloader(session).downloadReport(reportDefinition);

    response.saveToFile(reportFile);

 

}

Google Ads API Forum Advisor Prod

unread,
Nov 5, 2020, 10:27:51 AM11/5/20
to adwor...@googlegroups.com
Hi,

Please be sure that you are running the report from a child account level, not a manager level. If you are running it from the child account level, please share your report definition and CID through reply privately to author so I can take a closer look.

Regards,
Anthony
Google Ads API Team

Google Logo
Anthony
Google Ads API Team
 


ref:_00D1U1174p._5004Q277IBx:ref

Gen Xin

unread,
Nov 6, 2020, 5:10:50 AM11/6/20
to AdWords API and Google Ads API Forum
@adsapiforumadvisor

HI team, I don't have right to reply to author in this group.


Screen Shot 2020-11-06 at 6.08.55 PM.png

Google Ads API Forum Advisor Prod

unread,
Nov 9, 2020, 12:11:20 AM11/9/20
to adwor...@googlegroups.com
Hi,

Since you are unable to reply privately via this thread, you may instead send the requested details directly to our 
googleadsa...@google.com alias.

Thanks,

Google Logo
Peter Laurence Napa Oliquino
Google Ads API Team
 


ref:_00D1U1174p._5004Q277IBx:ref

Google Ads API Forum Advisor Prod

unread,
Nov 11, 2020, 1:18:20 AM11/11/20
to adwor...@googlegroups.com
Hi Gen,

Thank you for providing the requested details privately.

Upon impersonating the report using the provided report definition and customer IDs, I was able to replicate the issue on my end.

Upon checking also in the Google Ads UI, the ads that generated metrics for the date range that you've set in the report are under app campaign and app engagement campaign.

However, ads that under these types of campaign are not supported in the Ad Performance Report. The supported reports for App campaign are listed on this document, as for app engagement campaign, this is not supported in the AdWords API. You may also verify this on your end.

As a workaround, you may use the Google Ads API reporting as the said campaign types are supported here. To know the equivalent view and fields of the Ad Performance Report in the Google Ads API, you may refer to this guide.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads API Team
 


ref:_00D1U1174p._5004Q277IBx:ref

Gen Xin

unread,
Nov 11, 2020, 1:42:13 AM11/11/20
to AdWords API and Google Ads API Forum
It's really helpful! Thank you!

Gen
Reply all
Reply to author
Forward
0 new messages