Проблема с AdWords при составлении отчетов об эффективности покупок

Я пытаюсь получить список продуктов с некоторыми подробностями из отчета об эффективности покупок. Я смог получить продукты с нулевым показом, но в 49 продуктах, которые я могу пройти через определенную кампанию, это показывает только 47.

Я анализировал данные о продуктах, и, по-видимому, ничего другого эти два просто не появляются.

 // Create selector.
$selector = new Selector();
$selector->setFields(
[
'OfferId',
'Brand'
]
);

// Set the predicates array
$predicates = [];

// Predicates offerIds

// Predicates campaigns
if (!empty($campaignIds)) {
$predicates[] = new Predicate('CampaignId', PredicateOperator::IN, $campaignIds);
}

// Predicates adgroups
if (!empty($adGroupIds)) {
//$predicates[] = new Predicate('AdGroupId', PredicateOperator::IN, $adGroupIds);
}


// Global predicates
$predicates[] = new Predicate('Impressions', PredicateOperator::EQUALS, [0]);
//$predicates[] = new Predicate('CampaignStatus', PredicateOperator::EQUALS, ['ENABLED']);


// Use a predicate to filter out paused criteria (this is optional).
$selector->setPredicates($predicates);

$reportDefinition = new ReportDefinition();
$reportDefinition->setSelector($selector);
$reportDefinition->setReportName('Shopping report #' . uniqid());
$reportDefinition->setDateRangeType(ReportDefinitionDateRangeType::ALL_TIME);
$reportDefinition->setReportType(ReportDefinitionReportType::SHOPPING_PERFORMANCE_REPORT);
$reportDefinition->setDownloadFormat(DownloadFormat::CSV);

// Download report.
$reportDownloader = new ReportDownloader(parent::getSession());

// Set the Report Settings Builder
$reportSettingsOverride = (new ReportSettingsBuilder())
->skipReportHeader(true)
->skipColumnHeader(true)
->skipReportSummary(true)
->build();

// Download the report
$reportDownloadResult = $reportDownloader->downloadReport($reportDefinition, $reportSettingsOverride);

// Stores the stream
$reportStream = $reportDownloadResult->getAsString();

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector