Re: Need help (paid!) migrating to 201209
Hi, This 201109 is deprecated use 201206 On Thursday, November 8, 2012 10:33:55 PM UTC+5:30, Andre Cox wrote: 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 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
Re: ADGROUP_REACH_FREQUENCY_REPORT doesn't return any records yet?
Hi, This report works.I have used this report and it gives me correct data .I have tested it for the fields which you have specified.But instead of using adhoc reports i use awql queries. The query which gets me this data is as follows:- $reportDefinition = SELECT AdGroupId,AdGroupName,AdGroupStatus,CampaignId,CampaignName,CampaignStatus,ReachFrequency,ReachFrequencyClicks,ReachFrequencyConv,ReachFrequencyConvRate,ReachFrequencyCtr,ReachFrequencyDate,UniqueUserCountAsLong FROM ADGROUP_REACH_FREQUENCY_REPORT DURING LAST_7_DAYS; On Thu, Oct 4, 2012 at 7:26 AM, dkasak daniel.ka...@247realmedia.comwrote: Hi. We noticed you have added an ADGROUP_REACH_FREQUENCY_REPORT report type. We'd like to use this data. When I create a report request: reportDefinition xmlns=https://adwords.google.com/api/adwords/cm/v201206 selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsAdGroupStatus/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsCampaignStatus/fields fieldsReachFrequency/fields fieldsReachFrequencyClicks/fields fieldsReachFrequencyConv/fields fieldsReachFrequencyConvRate/fields fieldsReachFrequencyCtr/fields fieldsReachFrequencyDate/fields fieldsUniqueUserCountAsLong/fields /selector reportNameADGROUP_REACH_FREQUENCY_REPORT/reportName reportTypeADGROUP_REACH_FREQUENCY_REPORT/reportType dateRangeTypeLAST_7_DAYS/dateRangeType downloadFormatGZIPPED_XML/downloadFormat /reportDefinition ... I get a gzipped XML, but it only contains headers; no rows. Is this report not working yet? Dan -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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
Re: v201109 == v201206 reporting issues
You can try this code.It gives me the output properly $username = ; $password = ; $customerId = ; $devToken = ; // Get an access code for the user $url = https://www.google.com/accounts/ClientLogin;; $params = array( accountType = GOOGLE, Email = $username, Passwd = $password, service = adwords, source = test ); $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $curlData = curl_exec($curl); curl_close($curl); // Parse the response $curlData = explode(\n, $curlData); $return = array(); foreach ($curlData as $value) { $value = explode(=, $value, 2); if (count($value) 1) { $return[$value[0]] = $value[1]; } } // Extract the access token $authToken = $return[Auth]; # $httpHeaders = array( Authorization: GoogleLogin auth=$authToken, clientCustomerId: $customerId, developerToken: $devToken ); $reportDefinition = 'reportDefinition selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields predicates fieldCriteriaType/field operatorNOT_EQUALS/operator valuesKEYWORD/values /predicates /selector reportNamereport/reportName reportTypeCRITERIA_PERFORMANCE_REPORT/reportType dateRangeTypeLAST_14_DAYS/dateRangeType downloadFormatXML/downloadFormat /reportDefinition'; $params = array(__rdxml = $reportDefinition); # $url = https://adwords.google.com/api/adwords/reportdownload/v201206;; $curl = curl_init(); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_POST, true); curl_setopt($curl, CURLOPT_POSTFIELDS, $params); curl_setopt($curl, CURLOPT_HTTPHEADER, $httpHeaders); //curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); $reportData = curl_exec($curl); curl_close($curl); print $reportData\n; On Wednesday, August 22, 2012 7:28:51 AM UTC+5:30, dkasak wrote: Hi all. I'm working on updating our code to v201206 and I'm getting errors when doing ad-hoc reports. An example of a request that works: URL: https://adwords.google.com/api/adwords/reportdownload/v201109 Definition: reportDefinition xmlns= https://adwords.google.com/api/adwords/cm/v201109; selector fieldsAdGroupId/fields fieldsAdGroupName/fields fieldsCampaignId/fields fieldsCampaignName/fields fieldsBottomPosition/fields fieldsCost/fields fieldsDate/fields fieldsFirstPageCpc/fields fieldsId/fields fieldsCriteria/fields fieldsCriteriaDestinationUrl/fields fieldsCriteriaType/fields fieldsQualityScore/fields fieldsAdNetworkType1/fields fieldsAdNetworkType2/fields fieldsAverageCpc/fields fieldsAverageCpm/fields fieldsAveragePosition/fields fieldsClickType/fields fieldsCtr/fields fieldsIsNegative/fields fieldsMaxCpm/fields fieldsPreferredPosition/fields predicates fieldCriteriaType/field operatorNOT_EQUALS/operator valuesKEYWORD/values /predicates /selector reportNamereport/reportName reportTypeCRITERIA_PERFORMANCE_REPORT/reportType