Ad Words Dashboard failing at ReportUtils::DownloadReportWithAwql

74 views
Skip to first unread message

Jesse Rock

unread,
Apr 25, 2016, 3:30:55 PM4/25/16
to AdWords API Forum
I have been asked to troubleshoot an issue with a adwords dashboard.  The code is failing at the ReportUtils::DownloadReportWithAwql() call and I am having very liitle luck poin pointing the issue.  Any thoughts would be greatly appreciated.  


$user->LoadService('ReportDefinitionService', API_VERSION);

$reportFormat = "TSV";

$reportQuery = "SELECT
    AdNetworkType1,
    AdNetworkType2,
    CampaignId,
    CampaignName,
    AccountDescriptiveName,
    AverageCpc,
    AverageCpm,
    AveragePosition,
    Clicks,
    Cost,
    CostPerConversionManyPerClick,
    Ctr,
    Impressions,
    SearchImpressionShare,
    TotalCost,
    ViewThroughConversions,
    NumOfflineImpressions,
    NumOfflineInteractions,
    ConversionsManyPerClick,EstimatedTotalConversions ";

$options = array(
    'version' => API_VERSION
    // 'includeZeroImpressions' => true
    // ,'returnMoneyInMicros' => true
);

$report = ReportUtils::DownloadReportWithAwql($reportQuery, null, $user, $reportFormat, $options);

Jesse Rock

unread,
Apr 25, 2016, 3:52:19 PM4/25/16
to AdWords API Forum

Fatal error: Class 'ReportUtils' not found

Error that I am receiving.

Shwetha Vastrad (AdWords API Team)

unread,
Apr 25, 2016, 4:38:30 PM4/25/16
to AdWords API Forum
Hi Jesse,

Have you correctly imported the 'ReportUtils' class into your program? 

Please have a look at the DownloadCriteriaReport PHP example which demonstrates how to use the ReportDefinitionService to download the Criteria Performance Report to a file. Another possible error I noticed is that you have not provided the report name in the query which could throw an error later when you have fixed the import issue. 

Regards,
Shwetha, AdWords API Team.

Reply all
Reply to author
Forward
0 new messages