Hi, would i'd like to achieve is to know everyday how much of the budget was spent the day before. Thas my code :
$selector = new Selector(); $yesterday = date('Ymd',strtotime("-2days")); $today = $yesterday = date('Ymd',strtotime("-1days")); $selector->setFields(["Amount","Cost"]); $selector->setDateRange(new DateRange($yesterday, $today)); $selector->setPredicates([ new Predicate('AssociatedCampaignId', PredicateOperator::IN, [$idcampagna])]); $reportDefinition = new ReportDefinition(); $reportDefinition->setSelector($selector); $reportDefinition->setReportName('Report per la campagna #' . $idcampagna); $reportDefinition->setDateRangeType(ReportDefinitionDateRangeType::CUSTOM_DATE); $reportDefinition->setReportType(ReportDefinitionReportType::BUDGET_PERFORMANCE_REPORT); $reportDefinition->setDownloadFormat(DownloadFormat::CSV); $reportDownloader = new ReportDownloader($session); $reportSettingsOverride = (new ReportSettingsBuilder()) ->includeZeroImpressions(false) ->build(); $reportDownloadResult = $reportDownloader->downloadReport($reportDefinition, $reportSettingsOverride); $result = $reportDownloadResult->getAsString(); $result2 = array_filter(explode("\n",$result)); The problem is that the Cost is greater than the ammount, how that's possibile? any help would be apreciated, thanks -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog: https://googleadsdeveloper.blogspot.com/ =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads 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 --- You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/67b55100-d3a4-454b-889b-489435b37a9a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.