How can I retrieve interaction metrics (Clicks, Impressions, Keywords, etc...) via the API without downloading an Ad Hoc report?

127 views
Skip to first unread message

jnethe...@gmail.com

unread,
Sep 16, 2014, 1:33:56 PM9/16/14
to adwor...@googlegroups.com
I'm trying to retrieve data from my AdWords account to display in my application, and I'm trying to simply pull down relevant data to associate with my Campaigns and Ad Groups and I can't seem to find any services that are related to this. The only way that I've found to get this data is to download a report, which is a massive waste of time for me, because it just adds an extra step in processing the data that gets pulled down.

In previous versions of the AdWords API, you were able to use Clicks, Impressions, etc as selector fields, but this functionality seems to have mysteriously disappeared. So... where did this data go? How can I get it?

Danial Klimkin

unread,
Sep 17, 2014, 8:13:21 AM9/17/14
to adwor...@googlegroups.com
Hello,


Stats data is now available in reports only:



-Danial, AdWords API Team.

adwapi.s...@gmail.com

unread,
Oct 27, 2015, 10:08:03 AM10/27/15
to AdWords API Forum
Hi,

It is possible to not download report, but get it in string.
Just set parameter "file_path" to null in method ReportUtils::DownloadReport
F. e.
$selector = new Selector();
$selector->fields = array('CampaignId', 'AdGroupId', 'AdGroupName', 'AdNetworkType1', 'Impressions', 'Clicks', 'Cost');

$selector->predicates[] = new Predicate('AdGroupStatus', 'IN', array('ENABLED'));
$selector->predicates[] = new Predicate('CampaignStatus', 'IN', array('ENABLED'));

$reportDefinition = new ReportDefinition();
$reportDefinition->selector = $selector;
$reportDefinition->reportName = 'Criteria performance report #' . uniqid();
$reportDefinition->dateRangeType = 'LAST_7_DAYS';
$reportDefinition->reportType = 'ADGROUP_PERFORMANCE_REPORT';
$options = array('version' => ADWORDS_VERSION);

$result
= ReportUtils::DownloadReport($reportDefinition, null, $user, $options);

echo $
result;

Hope it helps you

вторник, 16 сентября 2014 г., 20:33:56 UTC+3 пользователь jnethe...@gmail.com написал:

Umesh Dengale

unread,
Nov 4, 2015, 3:28:58 PM11/4/15
to AdWords API Forum
Hello,

In the AdWords API, reports could be downloaded in these formats only. You could download the report in XML format and assign it to string. Please check out reporting basics guide for more details.

Regards,
Umesh, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages