Hi, I found the actual cause of my problem.
Since I was only using KEYWORD_PERFORMANCE_REPORT, it returned statistics only for automatic placements and none for Managed Placements. Thus, I have to run the report twice, once for KEYWORD_PERFORMANCE_REPORT and MANAGED_PLACEMENTS_PERFORMANCE_REPORT. Is there any other type of report, which includes automatic and managed placements? so that I dont have to run my queries twice. Please help. Thank you. -Vishal On Dec 27, 10:41 am, "[email protected]" <[email protected]> wrote: > Hello Evgeniy, > > I dont know if my code will help in this case, because the output only > for one my campaigns has this problem. All other campaigns give > correct output. > > protected void btnGenerateDate_Click(object sender, EventArgs e) > { > > user = new AdWordsUser(headers); > long reportDefinitionId = 0; > List<string> fields = new List<string>(); > > // get required fields for reporting > > // Create campaign predicate. > List<string> campaigns = new List<string>(); ; > > // get required campaigns for reporting > > Predicate CampaignPredicate = new Predicate(); > CampaignPredicate.field = "CampaignId"; > CampaignPredicate.@operator = PredicateOperator.IN; > CampaignPredicate.values = campaigns.ToArray(); > > Selector selector = new Selector(); > selector.fields = fields.ToArray(); > selector.dateRange = new DateRange(); > selector.dateRange.min = > txtStartDate.Text.ToString("yyyyMMdd"); > selector.dateRange.max = > txtEndDate.Text.ToString("yyyyMMdd"); > selector.predicates = new Predicate[] > { CampaignPredicate }; > > // Create report definition. > ReportDefinition reportDefinition = new > ReportDefinition(); > reportDefinition.reportName = "test"; > reportDefinition.dateRangeType = > ReportDefinitionDateRangeType.CUSTOM_DATE; > reportDefinition.reportType = reportType; > reportDefinition.downloadFormat = DownloadFormat.XML; > reportDefinition.selector = selector; > > ReportDefinitionOperation operation = new > ReportDefinitionOperation(); > operation.operand = reportDefinition; > operation.@operator = Operator.ADD; > > // Add report definition. > reportDefinitionService = > (ReportDefinitionService)user.GetService(AdWordsService.v201101.ReportDefin > itionService); > ReportDefinition[] result = > reportDefinitionService.mutate(new ReportDefinitionOperation[] > { operation }); > > // Display report definitions. > if (result != null) > { > foreach (ReportDefinition temp in result) > { > reportDefinitionId = temp.id; > } > > string url = string.Format("https:// > adwords.google.com/api/adwords/reportdownload?__rd={0}", > reportDefinitionId); > > WebRequest request = HttpWebRequest.Create(url); > > if (! > string.IsNullOrEmpty(reportDefinitionService.RequestHeader.clientCustomerId )) > { > request.Headers.Add("clientCustomerId: " + > reportDefinitionService.RequestHeader.clientCustomerId); > } > else if (! > string.IsNullOrEmpty(reportDefinitionService.RequestHeader.clientEmail)) > { > request.Headers.Add("clientEmail: " + > reportDefinitionService.RequestHeader.clientEmail); > } > > if (! > string.IsNullOrEmpty(reportDefinitionService.RequestHeader.authToken)) > { > request.Headers.Add("Authorization: > GoogleLogin auth=" + reportDefinitionService.RequestHeader.authToken); > } > > WebResponse response = request.GetResponse(); > XmlDocument xmlDoc = new XmlDocument(); > xmlDoc.Load(response.GetResponseStream()); > > XmlNodeList column = > xmlDoc.GetElementsByTagName("columns"); > > XmlNodeList childnodes = column[0].ChildNodes; > > XmlNodeList rows = > xmlDoc.GetElementsByTagName("row"); > } > > } > > I am using the AdWords.v201101 and AdWords.v13 library. > > Also, I noticed that this particular campaign which give the all > output keywords as "Content", is the only Paused campaign. Does this > have anything to do with it? > > Please let me know what you think. > > -Vishal > > On Dec 15, 5:11 pm, Evgeniy Bogdanov <[email protected]> wrote: > > > > > > > > > Hi Vishal. > > > Which library do you using? > > I think that you want to use TargetingIdeService, but have errors in > > your parameters. > > Please, show your code or SOAP XML request. > > > Regards, > > Evgeniy. -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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
