Hi all,
I am using the adwords API with version v201809 and I have the following question.
How can I generate the report CAMPAIGN_PERFORMANCE_REPORT without downloading the file (for example just showing the result). Here is actually what I do:
$reportQuery = 'SELECT CampaignId,CampaignName, Impressions, Clicks, Ctr , Cost '
. ' FROM CAMPAIGN_PERFORMANCE_REPORT '
. ' WHERE CampaignId = '.$campaignId.' DURING '.$date.','.$date;
// Download report.
ReportUtils::DownloadReportWithAwql($reportQuery, $filePath, $user,$reportFormat, $options);
$dataArray =file($filePath);
I download the file, then I read from the data to show it up.
Check the response of Anthony Madrigal answer but I am not clear with awql, since the example is in xml.
I hope you can help me.
Thanks.
This is the answer of the previous post.
[
$report = ReportUtils::DownloadReport($reportDefinition, NULL, $user, $options);
$xml = simplexml_load_string($report);
print "<pre>";
print_r($xml);
print "</pre>";
]
Hi Luis,
You may refer to this sample on how to print the results from AdWords reports. You may find more examples here based on your preferred language.
Regards,
Hiroyuki
Google Ads API Team