How to include Zero Impressions in Ad Performance Report?

1,846 views
Skip to first unread message

federico.sutin

unread,
Dec 13, 2011, 10:58:16 AM12/13/11
to AdWords API Forum
Hi,
I have created an Ad Performance Report, with this fields.

["AccountDescriptiveName","AdGroupId","AdGroupName","AdGroupStatus","AdType","AverageCpc","AverageCpm","AveragePosition","CampaignId","CampaignName","CampaignStatus","Clicks","Conversions","Cost","CreativeApprovalStatus","CreativeDestinationUrl","Ctr","CustomerDescriptiveName","Date","Description1","Description2","DisplayUrl","ExternalCustomerId","Headline","Id","ImageAdUrl","ImageCreativeName","Impressions","KeywordId","PromotionLine","Status","Url"]

I need data segmented by date, thats why i put that field . I realize
that field will prevent zero impressions.
"Date: Prevents zero-impression rows from being returned."

How can i get AdPerformance report segmented by date with zero
impressions?

Thanks in advance

federico.sutin

unread,
Dec 13, 2011, 11:48:16 AM12/13/11
to AdWords API Forum
I am currently using v201101

On 13 dic, 12:58, "federico.sutin" <federico.su...@gmail.com> wrote:
> Hi,
> I have created an Ad Performance Report, with this fields.
>

> ["AccountDescriptiveName","AdGroupId","AdGroupName","AdGroupStatus","AdType ","AverageCpc","AverageCpm","AveragePosition","CampaignId","CampaignName"," CampaignStatus","Clicks","Conversions","Cost","CreativeApprovalStatus","Cre ativeDestinationUrl","Ctr","CustomerDescriptiveName","Date","Description1", "Description2","DisplayUrl","ExternalCustomerId","Headline","Id","ImageAdUr l","ImageCreativeName","Impressions","KeywordId","PromotionLine","Status"," Url"]

Kevin Winter

unread,
Dec 15, 2011, 9:58:55 AM12/15/11
to adwor...@googlegroups.com
Hi,
  There's currently no way to perform this operation - because the impressions are tied to the date they happen upon, asking for the date naturally excludes dates with no impressions (because there was no record of impressions on that date).

- Kevin Winter
AdWords API Team

Dmitriy

unread,
Jan 20, 2012, 3:21:10 AM1/20/12
to adwor...@googlegroups.com
Hello Kevin.

I have use this:
ReportDefinition Object
(
[id] =>
[selector] => Selector Object
(
[fields] => Array
(
[0] => AdGroupId
[1] => AdGroupName
[2] => AdGroupStatus
[3] => AdType
[4] => AveragePosition
[5] => CampaignId
[6] => CampaignName
[7] => CampaignStatus
[8] => Clicks
[9] => ConversionValue
[10] => Cost
[11] => CreativeApprovalStatus
[12] => CreativeDestinationUrl
[13] => Description1
[14] => Description2
[15] => DisplayUrl
[16] => Headline
[17] => Id
[18] => Impressions
[19] => IsNegative
[20] => KeywordId
[21] => Slot
[22] => Status
)

[predicates] =>
[dateRange] =>
[ordering] =>
[paging] =>
)

[reportName] => Ad performance report #1326985594
[reportType] => AD_PERFORMANCE_REPORT
[hasAttachment] =>
[dateRangeType] => YESTERDAY
[downloadFormat] => CSV
[creationTime] =>
[includeZeroImpressions] => 1
)

And there are all impression values > 0 in the report, but I can see ones in AdWords web interface.

Please, advise.

Thanks, Dmitriy.

Kevin Winter

unread,
Jan 20, 2012, 9:35:20 AM1/20/12
to adwor...@googlegroups.com
Hi Dmitriy,
  The includeZeroImpressions field defaults to TRUE.  This field gives you the option of setting it to false to exclude zero impression rows without having to request a column designated as excluding zero impressions.  However, if you include such a column, zero impression rows WILL be excluded regardless of the value of includeZeroImpressions.

Dmitriy

unread,
Jan 20, 2012, 10:17:43 AM1/20/12
to adwor...@googlegroups.com
Hi Kevin,
I have try this:
    $reportDefinition = new ReportDefinition();
    $reportDefinition->selector = $selector;
    $reportDefinition->reportName = 'Ad performance report #' . time();
    $reportDefinition->dateRangeType = 'YESTERDAY';
    $reportDefinition->reportType = 'AD_PERFORMANCE_REPORT';
    $reportDefinition->downloadFormat = 'CSV';
    $reportDefinition->includeZeroImpressions = TRUE;
and try to comment last row. There are no zero impressions in report any way. All columns, showed in previous post, does not exclude zero impressions from report, as showed here
http://code.google.com/intl/en/apis/adwords/docs/appendix/reports.html#ad

Please, advise, that's wrong with my report query?

Thanks, Dmitriy.


Kevin Winter

unread,
Jan 20, 2012, 4:41:09 PM1/20/12
to adwor...@googlegroups.com
Hi Dmitriy,
  Could you please email me off-list with the specific account this report is run against as well as an example of the report you are receiving?

- Kevin Winter
AdWords API Team

Alexander Parij

unread,
Jan 24, 2012, 2:36:08 PM1/24/12
to adwor...@googlegroups.com
Kevin ,

Any chance that something else was broken in how the reports handle zero impression rows while fixing this bug ?

Alex.

Kevin Winter

unread,
Jan 24, 2012, 3:14:39 PM1/24/12
to adwor...@googlegroups.com
Hi Dmitriy,
  I apologize for the delay.  My colleague pointed out that your Selector includes the IsNegative field.  This field was incorrectly exposed in the Ad Performance Report.  It is a keyword field useful in Keyword Performance reports when obtaining keyword structure.  Because of the way this is tied to the Ad Performance Report, it has the side-effect of excluding zero impression rows when included as a field in this report.  I've updated the documentation for this field to reflect this: http://code.google.com/apis/adwords/docs/appendix/reports.html#ad

If you remove this field, you should get back zero impression rows.

Dmitriy

unread,
Feb 6, 2012, 6:33:21 AM2/6/12
to adwor...@googlegroups.com
Hi Kevin,
Thanks for answer. At last, I have download the Ad performance report with zero impressions, but only than remove Slot and KeywordId fields too.

TAZZY

unread,
Mar 6, 2012, 2:23:35 AM3/6/12
to adwor...@googlegroups.com
Hey Kevin, 
m downloading parallel reports for multiple clients in my mcc account. Some reports failing randomly giving 400 error with a message [Report failed for customer ID 5348364015 with code 400 after 1 retries.Message : Report download error occured: cvc-complex-type.2.4.a: Invalid content was found starting with element 'selector'. One of '{"https://adwords.google.com/api/adwords/cm/v201109":creationTime, "https://adwords.google.com/api/adwords/cm/v201109":includeZeroImpressions}' is expected.]

in my report_definition, i didn't mention any of creation_time or :includeZeroImpressions.
What could be the reason? other reports are working fine with the same report_definition. Why the failing report have this problem?
Message has been deleted

Kevin Winter

unread,
Mar 6, 2012, 10:08:22 AM3/6/12
to adwor...@googlegroups.com
Hi,
  You'd need to post your ReportDefinition XML for me to be sure, but it sounds like you might be providing the ReportDefinition elements out of order.  The XML validator is very strict and requires the elements to be provided in the order they are defined (see our XSD, published here: https://adwords.google.com/api/adwords/reportdownload/v201109/reportDefinition.xsd).  You need to provide your selector as the first element according to the XSD.

- Kevin Winter
AdWords API Team

TAZZY

unread,
Mar 7, 2012, 12:34:24 AM3/7/12
to adwor...@googlegroups.com
report_definition = {
      :selector => {
        :date_range => {
          :min => start_date,
          :max => end_date
        },
        :fields => ['CustomerDescriptiveName', 'ExternalCustomerId', 'Impressions', 'Clicks', 'Conversions', 'Date', 'ConversionRate', 'Cost', 'CostPerConversion']
        },
      :report_name => report_name,
      :report_type => 'ACCOUNT_PERFORMANCE_REPORT',
      :download_format => 'XML',
      :date_range_type => 'CUSTOM_DATE'
      }

if fields on report_definition is out of order, then how its working for rest of clients in mcc. Any of the report fails randomly. now the error has changed to
Report failed for customer ID ********** with code 400 after 1 retries.Message : Report download error occured: cvc-complex-type.2.4.a: Invalid content was found starting with element 'fields'. One of '{"https://adwords.google.com/api/adwords/cm/v201109":ordering, "https://adwords.google.com/api/adwords/cm/v201109":paging}' is expected.
Why do i include such fields like ordering, paging, includezeroimpressions when i actually don't need thenm

Kevin Winter

unread,
Mar 7, 2012, 10:55:23 AM3/7/12
to adwor...@googlegroups.com
Hi,
  The soap validation is very literal.  If in the selector you first specify the dateRange followed by fields, it checks the XSD and see that dateRange is valid as a first element.  It then sees fields, but according to the XSD, either paging or ordering must come next, so it throws that error message.  You need to make sure you provide the fields in the correct error, but you can omit fields you don't need (as long as the fields you do include are in the right order). Our client libraries should handle this reordering for you - if you are using a client library (the code looks like it might be Ruby?), please file an issue on the client library's issue tracker so we can fix this.

- Kevin Winter
AdWords API Team
Reply all
Reply to author
Forward
0 new messages