Blank campaign performance report

174 views
Skip to first unread message

IMM Boulder

unread,
Oct 23, 2014, 10:05:06 PM10/23/14
to adwor...@googlegroups.com
This is my first time working with the adwords api so I assume that I am missing something that I am not finding in any of the documentation that I have found.  I am using the googleads php library from github to submit my request to the api and it seems to be working fine with the exception that I am getting a blank report with just the name, header and footer of the report, like so:


"Daily_Cost_by_Campaign_VIQ_Cost_File_Google (Oct 16, 2014-Oct 22, 2014)"
Campaign ID,Network,Campaign,Impressions
Total, --, --,0


I should be seeing a report with records in the thousands.

Report request info:

fields: "CampaignId", "AdNetworkType1", "CampaignName", "Impressions"
one predicate: 
"CampaignStatus", "IN", array("ENABLED", "PAUSED", "REMOVED")
report name: 
Daily_Cost_by_Campaign_VIQ_Cost_File_Google
time frame: LAST_7_DAYS
report type: CAMPAIGN_PERFORMANCE_REPORT
format: CSV


Any tips that I might be able to try?  Thanks for your help in advance, I can post my code if necessary.

Josh Radcliff (AdWords API Team)

unread,
Oct 24, 2014, 2:23:16 AM10/24/14
to adwor...@googlegroups.com
Hi,

If you do not have any impressions (no ads served) for those campaigns and for the date range of your report, then you'll want to explicitly request zero impression rows. In the PHP library you would do this by setting includeZeroImpressions to TRUE on your ReportDefinition, as mentioned in the DownloadCriteriaReport.php code example.

You may also want to check out our Zero Impression Reports guide for more details.

Cheers,
Josh, AdWords API Team
Message has been deleted

IMM Boulder

unread,
Oct 24, 2014, 2:57:01 AM10/24/14
to adwor...@googlegroups.com
Thank you for the reply and yes, I saw that, and have that:
$reportDefinition->includeZeroImpressions = true;

Plus, we have several thousand impressions per day so I'm sure this is not the case.  I'm wondering though, since we have several accounts in MCC, is there something special that I need to do to run a report on any or all of them?  I am using the main account login for the refresh_token which is the same account that we all log into and run reports from in the UI, is that ok or do I need to do something different to run a report on one of the accounts listed in MCC from the API?

Josh Radcliff (AdWords API Team)

unread,
Oct 24, 2014, 1:46:03 PM10/24/14
to adwor...@googlegroups.com
Hi,

Ah, I think I know the issue then. You cannot run cross-account reports -- you need to run a report for each account in your MCC separately. On each report run, set the clientCustomerId header to the AdWords account (not the MCC) before submitting your request.

Cheers,
Josh, AdWords API Team

IMM Boulder

unread,
Oct 24, 2014, 4:01:13 PM10/24/14
to adwor...@googlegroups.com
string(61) "https://adwords.google.com/api/adwords/reportdownload/v201409"

array
(3) {
 
["Authorization"]=>
 
string(90) "Bearer [removed]"
 
["developerToken"]=>
 
string(22) "[removed]"
 
["clientCustomerId"]=>
 
string(12) "[removed]"
}

array
(1) {
 
["__rdxml"]=>
 
string(622) "<?xml version="1.0"?>
<reportDefinition>
  <selector>
    <fields>CampaignId</fields>
    <fields>AdNetworkType1</fields>
    <fields>CampaignName</fields>
    <fields>Impressions</fields>
    <predicates>
      <field>Impressions</field>
      <operator>GREATER_THAN</operator>
      <values>10</values>
    </predicates>
  </selector>
  <reportName>Daily_Cost_by_Campaign_VIQ_Cost_File_Google</reportName>
  <reportType>CAMPAIGN_PERFORMANCE_REPORT</reportType>
  <dateRangeType>LAST_7_DAYS</dateRangeType>
  <downloadFormat>CSV</downloadFormat>
  <includeZeroImpressions>true</includeZeroImpressions>
</reportDefinition>"

}


This is the data being sent.  I have verified that the clientCustomerId matches the client id of which I am trying to run the report for.  I am going to switch to different clients within MCC to see if I get different results.

IMM Boulder

unread,
Oct 24, 2014, 4:11:25 PM10/24/14
to adwor...@googlegroups.com
I got it.  I wasn't drilling down deep enough.  we have a parent client id with sub client ids with sub-sub client ids.  Is there no way to run a report across all sub-sub client ids by using a sub client id?

Josh Radcliff (AdWords API Team)

unread,
Oct 24, 2014, 8:33:59 PM10/24/14
to adwor...@googlegroups.com
Hi,

Currently there's no way to run a report for multiple clients in a single request. What most users do is use ManagedCustomerService to get the hierarchy of client IDs under an MCC, then submit a separate report request for each of those client IDs.

You may find the GetAccountHierarchy.php example useful -- it navigates down the tree of accounts for you.

Cheers,
Josh, AdWords API Team
Reply all
Reply to author
Forward
0 new messages