Geo_Performance_Report Returns Zero For Live Accounts

34 views
Skip to first unread message

YG

unread,
Sep 17, 2019, 7:06:47 PM9/17/19
to AdWords API and Google Ads API Forum
Hey all,

We are having a bit of issue accessing geo_performance_report. We have basic level API access (We can access live accounts)

We are running AWQL in Java.
Here's the code for authentication

public static void main(String[] args) {
 
      AdWordsSession session;
 
      try {
 
          // Generate a refreshable OAuth2 credential.
 
          Credential oAuth2Credential =
 
                  new OfflineCredentials.Builder()
 
                          .forApi(Api.ADWORDS)
 
                          .withClientSecrets("XXXXXXXXXXXXXXXX", "YYYYYYYYYYYYYYYY")
 
                          .withRefreshToken("ZZZZZZZZZZZZZZZ")
 
                          .build()
 
                          .generateCredential();

 
          AdWordsServicesInterface adWordsServices = AdWordsServices.getInstance();


 
          List<String> ids = new ArrayList<>(Arrays.asList(
 
                  "123-456-7890",
   
                "234-567-8901",
 
          ));


 
          for (String id : ids) {
 
              // Construct an AdWordsSession.
 
              try {
 
                  session =
 
                          new AdWordsSession.Builder()
 
                                  .withDeveloperToken("WWWWWWWWWWWWWWWWWW")
 
                                  .withOAuth2Credential(oAuth2Credential)
 
                                  .withClientCustomerId(id)
 
                                  .build();
 
                  runExample(adWordsServices, session);
 
              } catch (Exception e) {
 
                  e.printStackTrace();
 
              }
 
          }

 
      } catch (OAuthException e) {
 
          e.printStackTrace();
 
      } catch (ValidationException e) {
 
          e.printStackTrace();
 
      }
 
  }

Once we've authenticated, we run the following method

public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session)
 
      throws ReportDownloadResponseException, ReportException, IOException {
 
      ReportQuery query =
 
              new ReportQuery.Builder()
 
                      .fields("AccountDescriptiveName", "Conversions", "Clicks", "Impressions", "Cost", "CountryCriteriaId")
 
                      .from(ReportDefinitionReportType.GEO_PERFORMANCE_REPORT)
 
                      .during(ReportDefinitionDateRangeType.LAST_30_DAYS)
 
                      .build();

 
      ReportingConfiguration reportingConfiguration =
 
              new ReportingConfiguration.Builder()
 
                      .build();
 
      session.setReportingConfiguration(reportingConfiguration);

 
      ReportDownloaderInterface reportDownloader =
 
              adWordsServices.getUtility(session, ReportDownloaderInterface.class);
 
      reportDownloader.setReportDownloadTimeout(60000);
 
      BufferedReader reader = null;
 
      try {

 
          final ReportDownloadResponse response =
 
                  reportDownloader.downloadReport(query.toString(), DownloadFormat.CSV);

 
          reader = new BufferedReader(new InputStreamReader(response.getInputStream(), UTF_8));


 
          String line;
 
          Splitter splitter = Splitter.on(',');
 
          while ((line = reader.readLine()) != null) {
 
              System.out.println(line);
 
          }

 
      } finally {
 
          if (reader != null) {
 
              reader.close();
 
          }
 
      }
 
  }


Here's the (partial) result:

Sep 16, 2019 5:20:21 PM com.google.api.ads.common.lib.utils.logging.RemoteCallLoggerDelegate logRequestSummary
INFO: Request made: Service: reportdownload Method: POST clientCustomerId: XXX-XXX-XXXX URL: https://adwords.google.com//api/adwords/reportdownload/v201809 Request ID: null ResponseTime(ms): null OperationsCount: null IsFault: false FaultMessage: null
"GEO_PERFORMANCE_REPORT (Aug 18, 2019-Sep 16, 2019)"
Account,Conversions,Clicks,Impressions,Cost,Country/Territory
Total,0.00,0,0,0, --

Total impressions by ad network type 1:

Sep 16, 2019 5:20:23 PM com.google.api.ads.common.lib.utils.logging.RemoteCallLoggerDelegate logRequestSummary
INFO: Request made: Service: reportdownload Method: POST clientCustomerId: XXX-XXX-XXXX URL: https://adwords.google.com//api/adwords/reportdownload/v201809 Request ID: null ResponseTime(ms): null OperationsCount: null IsFault: false FaultMessage: null
"GEO_PERFORMANCE_REPORT (Aug 17, 2019-Sep 15, 2019)"
Account,Conversions,Clicks,Impressions,Cost,Country/Territory
Total,0.00,0,0,0, --

Total impressions by ad network type 1:

As you can see the results are all zero. These are live accounts that spend 6 figures per month. They cannot be zero.

We are not sure what's causing this issue. One team member thinks this might be an authentication issue. We ran another report (campaign_performance_report) and it worked fine (using the same auth method) so personally I don't think this is an authentication issue. Further more, if it's auth issue, I feel like the API should return some kind of auth error. 

I'm guessing the issue is caused by missing a parameter or selecting data in a way that's not supported. 

Anyway, thanks in advance! Any help is greatly appreciated!
Reply all
Reply to author
Forward
0 new messages