Pessoal, queria saber como filtrar somente resultados Rede de Pesquisa e
não vir junto de a de Display?
Estou tentando a um tempo, só que não consigo.
Já tentei usar esse predicado: *AdvertisingChannelType*, Porém não
consegui. Segue o código abaixo:
<?php
error_reporting(-1);
ini_set('display_errors',1);
$path = dirname(__FILE__) . '/../../src';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);
require_once '/Google/Api/Ads/AdWords/Lib/AdWordsUser.php';
$user = new AdWordsUser();
$user->SetClientCustomerId('849-948-1308');
// Log SOAP XML request and response.
$user->LogDefaults();
$user->LoadService('ReportDefinitionService', 'v201409');
$LoadService = $user->LoadService('ReportDefinitionService', 'v201409');
// Create selector.
$selector = new Selector();
$selector->fields = array('AdNetworkType1', 'CampaignId', 'Impressions',
'Clicks', 'Conversions', 'Ctr', 'AveragePosition');
// Filter out deleted criteria.
//$selector->predicates[] = new Predicate('AdvertisingChannelType', 'IN',
array('SEARCH'));
// Create report definition.
$reportDefinition = new ReportDefinition();
$reportDefinition->selector = $selector;
$reportDefinition->reportName = ' ';
$reportDefinition->reportName = 'Campaign performance report #' . uniqid();
$reportDefinition->dateRangeType = 'ALL_TIME';
$reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
$reportDefinition->downloadFormat = 'CSV'; //CSVFOREXCEL
// Exclude criteria that haven't recieved any impressions over the date
range.
$reportDefinition->includeZeroImpressions = FALSE;
// Set additional options.
$options = array('version' => 'v201409', 'returnMoneyInMicros' => TRUE);
$filePath = NULL;
$report = ReportUtils::DownloadReport($reportDefinition, $filePath, $user,
$options = NULL);
printf("Report contents are \n %s", $report);
?>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/f3386217-7fc2-445f-ab01-e99e0a524451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.