Hi,
We have a script using DownloadCriteriaReport function but it stopped
working about 3 days ago. It was using the 201109 php library.
I'm now getting this error:
You are accessing an AdWords API version v201109 that has been
discontinued. Calls to this version may fail. Please visit the AdWords API
blog for information on migration to the new AdWords API version
I simply don't have the time to work out how to migrate so i'm looking to
pay someone to do it for me. Its pretty simple if you know what you are
doing and our script only has one function:
function DownloadCriteriaReportExample(AdWordsUser $user, $filePath,
> $start_date, $end_date) {
> // Load the service, so that the required classes are available.
> $user->LoadService('ReportDefinitionService', 'v201109');
> // Create selector.
> $selector = new Selector();
> #$selector->fields = array('CampaignId', 'AdGroupId', 'Id', 'Criteria',
> # 'CriteriaType', 'Impressions', 'Clicks', 'Cost');
> $selector->fields =
> array('CampaignId','CampaignName','Clicks','Impressions','Cost','AveragePosition','AverageCpc','Ctr');
> // Filter out deleted criteria.
> #$selector->predicates[] = new Predicate('Status', 'NOT_IN',
> array('DELETED'));
> $dateRange = new DateRange();
> $dateRange->min = $start_date;
> $dateRange->max = $end_date;
> $selector->dateRange = $dateRange;
> // Create report definition.
> $reportDefinition = new ReportDefinition();
> $reportDefinition->selector = $selector;
> $reportDefinition->reportName = 'Criteria performance report #' .
> uniqid();
> $reportDefinition->dateRangeType = 'CUSTOM_DATE';
> #$reportDefinition->reportType = 'CRITERIA_PERFORMANCE_REPORT';
> $reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
> $reportDefinition->downloadFormat = 'CSV';
> // Exclude criteria that haven't recieved any impressions over the date
> range.
> $reportDefinition->includeZeroImpressions = TRUE;
> // Set additional options.
> $options = array('version' => 'v201109', 'returnMoneyInMicros' => FALSE);
> // Download report.
> ReportUtils::DownloadReport($reportDefinition, $filePath, $user,
> $options);
> /*
> printf("Report with name '%s' was downloaded to '%s'.\n",
> $reportDefinition->reportName, $filePath);
> */
> }
So yeah, anyone wanting to earn a quick bit to get this working for me,
please let me know.
Many thanks,
Andre
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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