Hi all,
I have a Marketing Report that executes different requests to different API reports. We get, for example, CriteriaType (selector) from Criteria Performance Report, using Id, AdGroupId and CampaignId as filters (predicates). It has been working, but we realized that this report stopped working in Octuber 27 (we are not getting data). We modified the report to select Id and removed all the predicates, but it still empty.
Here is our code:
ReportDefinition definition = new
ReportDefinition();
definition.reportName =
"CRITERIA_PERFORMANCE_REPORT";
definition.reportType =
ReportDefinitionReportType.CRITERIA_PERFORMANCE_REPORT;
definition.downloadFormat = DownloadFormat.XML;
definition.dateRangeType =
ReportDefinitionDateRangeType.ALL_TIME;
definition.includeZeroImpressions = true;
// Create
selector, only the criteria type field.
Selector selector
= new Selector();
selector.fields = new string[] {
"CriteriaType" };
//Create the condition by keywordId,
adGroupId, CampaignId
Predicate predicate = new
Predicate();
predicate.field = "Id";
predicate.@operator = PredicateOperator.EQUALS;
predicate.values = new string[] { keywordId };
Predicate
predicate2 = new Predicate();
predicate2.field =
"AdGroupId";
predicate2.@operator =
PredicateOperator.EQUALS;
predicate2.values = new string[] {
adGroupId };
Predicate predicate3 = new
Predicate();
predicate3.field =
"CampaignId";
predicate3.@operator =
PredicateOperator.EQUALS;
predicate3.values = new string[] {
campaignId };
selector.predicates = new Predicate[] {
predicate, predicate2, predicate3 };
definition.selector
= selector;
definition.includeZeroImpressions =
false;
//Apply the customer id
(user.Config as AdWordsAppConfig).ClientCustomerId =
pCustomerCliendId;
ReportUtilities utilities = new
ReportUtilities(user);
utilities.ReportVersion =
"v201406";
ClientReport criteriaPerformanceReport = utilities.GetClientReport(definition);
Here is the response:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<report>
<report-name name='CRITERIA_PERFORMANCE_REPORT'/>
<date-range date='All Time'/>
<table>
<columns>
<column name='criteriaType' display='Criteria Type'/>
</columns>
</table>
</report>
Notes: I found a thread with a similar problem, but the problem was distinct, because the guy has the problem when he use Date as selector.
Thanks,