Hi All,
Am currently trying to get Average CTR for search Adgroups - but currently
get CTRS for all Adgroups. Any suggestion on how to limit to only the
search network and eligible accounts.
Results so far:
CTR:43
CTR:100
CTR:100
CTR:100
CTR:14
CTR:100
CTR:0
CTR:50
CTR:100
CTR:100
CTR:16
CTR:33
CTR:100
//Download Search Query Performance Report
$this->user->LoadService('ReportDefinitionService',
$this->adwords_version);
$unique_id = uniqid();
$reportDefinition = new ReportDefinition();
$reportDefinition->reportName = 'Search Query Performance
Report #' . $unique_id;
$reportDefinition->dateRangeType = 'CUSTOM_DATE';
$reportDefinition->reportType =
'SEARCH_QUERY_PERFORMANCE_REPORT';
$reportDefinition->downloadFormat = 'XML';
$startDate = date("Ymd", strtotime("-31 days"));
$endDate = date("Ymd", strtotime("-1 days"));
$selector = new Selector();
$selector->fields = array(
'AdGroupId',
'AdGroupName',
'Impressions',
'Clicks',
'Ctr'
);
$selector->dateRange = new DateRange($startDate, $endDate);
$selector->predicates[] = new Predicate('AdNetworkType1',
'EQUALS', array('SEARCH'));
$selector->predicates[] = new Predicate('AdGroupStatus',
'EQUALS', array('ENABLED'));
$selector->predicates[] = new Predicate('AdGroupId', 'IN',
array_keys($this->active_adGroups));
$reportDefinition->selector = $selector;
$fileName = 'searchquery.xml';
$path = $this->directory . $fileName;
$options = array('version' => $this->adwords_version);
$reportUtils = new ReportUtils();
$reportUtils->DownloadReport($reportDefinition, $path,
$this->user, $options);
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c1d5d563-263d-408e-bf8f-9cae0bfef17f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.