Re: ReportDefinition Cost field format change?
The docs clearly state that for a CAMPAIGN_PERFORMANCE_REPORT field Cost is type Money. $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); // Create selector. $selector = new Selector(); $selector-fields = array('CampaignId', 'CampaignName', 'Status', 'Clicks', 'Cost', 'Date'); // Report definition. $reportDefinition = new ReportDefinition(); $reportDefinition-reportName = 'Report'; $reportDefinition-dateRangeType = 'LAST_7_DAYS'; $reportDefinition-reportType = 'CAMPAIGN_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-selector = $selector; $xml_data = DownloadReport($user, $reportDefinition); For v201309: row campaignID='1234' campaign='Cmp Name' campaignState='active' clicks='15' cost='40.24' day='2014-06-30' / For v201402: row campaignID='1234' campaign='Cmp Name' campaignState='active' clicks='15' cost='4024' day='2014-06-30' / Please help! On Saturday, July 5, 2014 9:59:29 PM UTC-4, stiggywigget wrote: Cost field is a decimal value 7.44 in XML format for API v201309 (PHP) Cost field is a integer value 744 in XML format for API v201402 (PHP) I haven't found an explanation for this change. TIA. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ReportDefinition Cost field format change?
Minor correction. $xml = ReportUtils::DownloadReport($reportDefinition, $filepath = NULL, $user, NULL); On Sunday, July 6, 2014 12:14:00 PM UTC-4, stiggywigget wrote: The docs clearly state that for a CAMPAIGN_PERFORMANCE_REPORT field Cost is type Money. $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); // Create selector. $selector = new Selector(); $selector-fields = array('CampaignId', 'CampaignName', 'Status', 'Clicks', 'Cost', 'Date'); // Report definition. $reportDefinition = new ReportDefinition(); $reportDefinition-reportName = 'Report'; $reportDefinition-dateRangeType = 'LAST_7_DAYS'; $reportDefinition-reportType = 'CAMPAIGN_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-selector = $selector; $xml_data = DownloadReport($user, $reportDefinition); For v201309: row campaignID='1234' campaign='Cmp Name' campaignState='active' clicks='15' cost='40.24' day='2014-06-30' / For v201402: row campaignID='1234' campaign='Cmp Name' campaignState='active' clicks='15' cost='4024' day='2014-06-30' / Please help! On Saturday, July 5, 2014 9:59:29 PM UTC-4, stiggywigget wrote: Cost field is a decimal value 7.44 in XML format for API v201309 (PHP) Cost field is a integer value 744 in XML format for API v201402 (PHP) I haven't found an explanation for this change. TIA. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: ReportDefinition Cost field format change?
In the v201402 release notes: https://developers.google.com/adwords/api/docs/reference/ there is a section that says: ReturnMoneyMicros defaults to true Money fields https://developers.google.com/adwords/api/docs/guides/reporting-concepts#formats will be returned in micros by default. You can enable the old behavior by sending the ReturnMoneyMicros header with the value of false. Note: This field will be removed in the future. Maybe that's what happened? Oliver On Sunday, July 6, 2014 5:21:19 PM UTC+1, stiggywigget wrote: Minor correction. $xml = ReportUtils::DownloadReport($reportDefinition, $filepath = NULL, $user, NULL); On Sunday, July 6, 2014 12:14:00 PM UTC-4, stiggywigget wrote: The docs clearly state that for a CAMPAIGN_PERFORMANCE_REPORT field Cost is type Money. $user-LoadService('ReportDefinitionService', ADWORDS_VERSION); // Create selector. $selector = new Selector(); $selector-fields = array('CampaignId', 'CampaignName', 'Status', 'Clicks', 'Cost', 'Date'); // Report definition. $reportDefinition = new ReportDefinition(); $reportDefinition-reportName = 'Report'; $reportDefinition-dateRangeType = 'LAST_7_DAYS'; $reportDefinition-reportType = 'CAMPAIGN_PERFORMANCE_REPORT'; $reportDefinition-downloadFormat = 'XML'; $reportDefinition-selector = $selector; $xml_data = DownloadReport($user, $reportDefinition); For v201309: row campaignID='1234' campaign='Cmp Name' campaignState='active' clicks='15' cost='40.24' day='2014-06-30' / For v201402: row campaignID='1234' campaign='Cmp Name' campaignState='active' clicks='15' cost='4024' day='2014-06-30' / Please help! On Saturday, July 5, 2014 9:59:29 PM UTC-4, stiggywigget wrote: Cost field is a decimal value 7.44 in XML format for API v201309 (PHP) Cost field is a integer value 744 in XML format for API v201402 (PHP) I haven't found an explanation for this change. TIA. -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 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 Forum group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.