简体   繁体   中英

Campaigns Performance Report wont include campaigns with zero impressions

I have an application that gets its data from our Google Adwords account.

Particularly, It gets the list of ad campaigns along with their results (number of clicks, cost, etc...). The problem is that, in spite of the google API definition specification say that:

"The Campaigns Performance report includes all statistics aggregated by default at the campaign level, one row per campaign ".

I'm only getting the campaigns which have non-zero value in their columns (For example, has been displayed al least one time).

Do you have any idea of **how to include all the campaigns in the report, even when its values are

Thanks a lot.

EDIT: It happened when the campaigns had exactly 0 impressions.

I have finally found a way to get it:

  // Report Creation
  $reportDefinition = new ReportDefinition();
  $reportDefinition->selector = $selector;
  $reportDefinition->reportName = 'Adgroup performance report';
  $reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
  $reportDefinition->downloadFormat = 'CSV';

  // Exclude criteria that haven't recieved any impressions over the date range.
  $reportDefinition->includeZeroImpressions = TRUE;

The last line specifies that also must be included Campaigns with zero impressions. By default it's value is false, set it to true and you'll get all the info.

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