Hi,

Can anyone help me in getting this newly added AdNetworkType1 field using 
keyword Performance Report.(I need to get just the search or display only 
keywords based on some condition in our application).I tried to filter 
using predicate.I even tried to fetch this field as part of report so that 
i can filter while parsing file.In either case I get an empty 
file. Elimination of this field gives me complete set of keywords - which 
includes both search and display. 

Here is the report definition I use:

Predicate searchPredicate = new Predicate("AdNetworkType1", 
PredicateOperator.IN, new String[] {"SEARCH"});
Predicate negativePredicate = new Predicate("IsNegative", 
PredicateOperator.IN, new String[] {"FALSE", "false"});
Predicate keywordStatusPredicate = new Predicate("Status", 
PredicateOperator.IN, new String[] {UserStatus.ACTIVE.getValue()});
Predicate adGroupStatusPredicate = new Predicate("AdGroupStatus", 
PredicateOperator.IN, new String[] {AdGroupStatus.ENABLED.getValue()});
Predicate campaignStatusPredicate = new Predicate("CampaignStatus", 
PredicateOperator.IN, new String[] {CampaignStatus.ACTIVE.getValue()});

// Adding searchPredicate (with values SEARCH/CONTENT)to selector fetches 
an empty record
selector.setPredicates(new Predicate[] {negativePredicate, 
keywordStatusPredicate,adGroupStatusPredicate,campaignStatusPredicate});

// Get current data from AdServer--Adding AdNetworkType to this fetches an 
empty file
selector.setFields(new String[] 
{"CampaignName","CampaignId","CampaignStatus",
"AdGroupName","AdGroupId","AdGroupStatus", 
"KeywordText","Id",  "Status","KeywordMatchType", 
"MaxCpc","FirstPageCpc","IsNegative","DestinationUrl"});
// Create report definition.
ReportDefinition reportDefinition = new ReportDefinition();
reportDefinition.setReportName("Placement Listing & Status #" + 
System.currentTimeMillis());
reportDefinition.setDateRangeType(ReportDefinitionDateRangeType.TODAY);
reportDefinition.setReportType(ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT);
reportDefinition.setDownloadFormat(DownloadFormat.TSV);
reportDefinition.setIncludeZeroImpressions(true); //Tried setting this both 
true and false
reportDefinition.setSelector(selector);

Please suggest if I am missing anything in the above definition?

Appreciate any help.

Thanks
Supraja

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to