Hi Crosby, my guess would be that the "IsNegative" field is preventing zero-impression rows (and thus deleted keywords) from being returned. Try your report query with that field removed from the selector to see if that's really the case.
Cheers, Dorian On Monday, August 13, 2012 10:40:23 PM UTC+2, Crosby (StoneTempleConsulting) wrote: > > I'm trying to get a full snapshot of all structure data, including deleted > keywords. > The following report spec appears to fail to return data for deleted > keywords in some cases. > Any help modifying my report spec, or explaining the proper use of AdHoc > reports for my purpose would be great. > > adwords lib: v201109 > .NET lib: awapi_dotnet_lib_v13.3.0 > > FYI: In another report, I do get performance data, including rows for > keywords which are currently deleted, but which got traffic during my > report range. That's good. However, in this report I'm not interested in > performance data per se. I'd like to be able to pull a report the status > of everything as of today. > > FYI - date range set to "today" elsewhere in the code. > FYI - setting definition.includeZeroImpressions = true; > > > possible cause: Is this a data freshness issue? > > <<Code Snippet follows>> > > ReportDefinition definition = new ReportDefinition(); > > definition.reportName = "PPCTools_Adwords_AdGroupCriterion"; > definition.reportType = > ReportDefinitionReportType.KEYWORDS_PERFORMANCE_REPORT; > definition.downloadFormat = DownloadFormat.TSV; > definition.dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE; > > // http://code.google.com/apis/adwords/docs/appendix/reports.html > Selector selector = new Selector(); > selector.fields = new string[] { > "ExternalCustomerId" > ,"CampaignId" > ,"AdGroupId" > ,"Id" > ,"AccountDescriptiveName" > ,"CampaignName" > ,"AdGroupName" > ,"KeywordText" > ,"KeywordMatchType" > ,"IsNegative" > ,"MaxCpc" > ,"CampaignStatus" > ,"AdGroupStatus" > ,"Status" > ,"QualityScore" > }; > > // Fails to download deleted keywords > Predicate statusPredicate = new Predicate(); > statusPredicate.field = "Status"; > statusPredicate.@operator = PredicateOperator.IN; > statusPredicate.values = new string[] { "ACTIVE", "PAUSED", "DELETED" }; > > // NOPE: Seems to limit us to non-deleted keywords. We want everything. > //Predicate ImpressionsPredicate = new Predicate(); > //ImpressionsPredicate.field = "Impressions"; > //ImpressionsPredicate.@operator = > PredicateOperator.GREATER_THAN_EQUALS; > //ImpressionsPredicate.values = new string[] { "0" }; > > // NOPE: Seems to limit to items with traffic on the search network. > We want everything. > //Predicate AdNetworkType1Predicate = new Predicate(); > //AdNetworkType1Predicate.field = "AdNetworkType1"; > //AdNetworkType1Predicate.@operator = PredicateOperator.IN; > //AdNetworkType1Predicate.values = new string[] { "SEARCH" }; > > //selector.predicates = new Predicate[] { statusPredicate, > ImpressionsPredicate, AdNetworkType1Predicate }; > //selector.predicates = new Predicate[] { statusPredicate, > ImpressionsPredicate }; > selector.predicates = new Predicate[] { statusPredicate }; > > selector.dateRange = dates; > > definition.selector = selector; > definition.includeZeroImpressions = true; > bool inMicros = false; > > > > -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 [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
