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='40240000' 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 "7440000" 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.

Reply via email to