What is the maximum possible date range? ie. Can I download the last five years reprts uing API?
On Tuesday, 3 December 2013 12:24:52 UTC+5:30, [email protected] wrote: > > Thanks Josh. Setting the dateRange solved the issue. > > On Monday, December 2, 2013 12:00:10 PM UTC-8, Josh Radcliff (AdWords API > Team) wrote: >> >> Hi, >> >> You can achieve this by setting the dateRange attribute of your selector >> to a DateRange with the desired min and max dates. >> >> Cheers, >> Josh, AdWords API Team >> >> On Friday, November 29, 2013 8:37:07 AM UTC-5, [email protected] >> wrote: >>> >>> I am using adwords PHP client library for my application. I want to to >>> download reports for a custom date range and do not know the right >>> parameters used to set the dates. >>> >>> Following is the code I'm currently using: >>> >>> >>> $reportFileName = DS . 'AdPerformanceReport_dated.csv'; >>> $reportType = 'AD_PERFORMANCE_REPORT'; >>> $filePath = dirname(__FILE__) . $reportFileName; >>> $user = new AdWordsUser(); >>> >>> $user->LogAll(); >>> $user->SetClientCustomerId($adwordClientId); >>> $user->LoadService('ReportDefinitionService', ADWORDS_VERSION); >>> >>> $selector = new Selector(); >>> $selector->fields = $reportFields[$reportType]; >>> >>> // Create report definition. >>> $reportDefinition = new >>> ReportDefinition(); >>> $reportDefinition->selector = $selector; >>> $reportDefinition->reportName = 'Ad performance >>> report'; >>> $reportDefinition->dateRangeType = 'CUSTOM_DATE'; >>> $reportDefinition->reportType = $reportType; >>> $reportDefinition->downloadFormat = 'CSV'; >>> $reportDefinition->includeZeroImpressions = FALSE; >>> >>> $options = array('version' => ADWORDS_VERSION); >>> >>> // Download report. >>> ReportUtils::DownloadReport($reportDefinition, $filePath, $user, >>> $options); >>> >>> >>> I hope someone can tell me what are the right parameters to set dates. >>> >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. 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/43e1e29b-27d2-47a7-816e-26ac7874d6bf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
