Hi Nadine !

Thanks for the info. I had previously tested with "NULL" but I had not paid 
attention then it worked thank you!

Now that it's done, I can't find information to retrieve the values 
returned by the service. Do you have any info on this on how to do this?

Also, I found the "ConversionTrackerService" that returns many information. 
I found the "mostRecentConversionDate" field. With this field, I would be 
able to recover the most recent conversion date and compare it with today's 
date and then whether a conversion took place in the last 30 days.

The problem is that the field always seems empty! I will do another test 
but the field still seems empty even if conversion has been made.

What do you think of these two subjects?

Thank you,
Etienne

On Friday, November 20, 2015 at 1:55:07 PM UTC-5, Nadine Sundquist (AdWords 
API Team) wrote:
>
> Hi Etienne,
>
> Your English is definitely easy to understand. No worries there. I looked 
> at the PHP code that you have, and I looked at the Report Utils PHP 
> <https://github.com/googleads/googleads-php-lib/blob/d93465f2dbd0416f2b353fe6e597845e424224ec/src/Google/Api/Ads/AdWords/Util/ReportUtils.php>
>  
> code in the library. It looks like if you set the file path to *null*, 
> then it should skip over fopen(). Have you given that a try?
>
> Cheers,
> Nadine, AdWords API Team 
>
> On Friday, November 20, 2015 at 12:23:56 PM UTC-5, etienne....@admobio.com 
> <javascript:> wrote:
>>
>> Hi !
>>
>> Ok I tried several things and in different ways but if I don't specify 
>> filePath, logs always returns me:
>>
>> PHP Warning: fopen (): Filename can not be empty in 
>> src/Google/Api/Ads/AdWords/User/ReportUtils.php
>>
>> For now I'm stuck here. If you have a solution let me know and I will 
>> meanwhile do research.
>>
>> Thank you for your help !
>>
>> PS: Sorry for my English, I speak French from Quebec.
>>
>> Etienne
>>
>> *Here is my code that works and that allows me to download the report.*
>> function test(AdWordsUser $user) {
>>         
>>   // Load the service, so that the required classes are available.
>>   $user->LoadService('ReportDefinitionService', ADWORDS_VERSION);
>>
>>   // Create selector.
>>   $selector = new Selector();
>>   $selector->fields = array('CampaignId');
>>        
>>   //if ($timePeriod == "CUSTOM_DATE") {
>>   //$selector->dateRange = new DateRange($dateFrom, $dateTo);
>>   //}
>>
>>   // Create report definition.
>>   $reportDefinition = new ReportDefinition();
>>   $reportDefinition->selector = $selector;
>>   $reportDefinition->reportName = 'Performance report #' . uniqid();
>>   $reportDefinition->dateRangeType = 'LAST_7_DAYS';
>>   //$reportDefinition->reportType = 'ACCOUNT_PERFORMANCE_REPORT';
>>   $reportDefinition->reportType = 'CAMPAIGN_PERFORMANCE_REPORT';
>>   $reportDefinition->downloadFormat = 'XML';
>>
>>   // Set additional options.
>>   $options = array('version' => ADWORDS_VERSION);
>>
>>   $filePath = "reports/test.xml";
>>  
>>   // Download report.
>>   ReportUtils::DownloadReport($reportDefinition, $filePath, $user, 
>> $options);
>>   
>>   printf("Report with name '%s' was downloaded to '%s'.\n", 
>> $reportDefinition->reportName, $filePath);
>> }
>>
>>
>>
>>
>>
>> On Friday, November 20, 2015 at 9:58:12 AM UTC-5, Anthony Madrigal wrote:
>>>
>>> Hi Etienne,
>>>
>>> I am not 100% certain of the PHP equivalent since I focus primarily on 
>>> Java, but I will help as best I can. I believe that for 
>>> *Lib\Util\ReportUtils.DownloadReport 
>>> *for the PHP example 
>>> <https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201509/Reporting/DownloadCriteriaReportWithAwql.php#L66>,
>>>  
>>> the return type is "if path isn't specified the contents of the report, 
>>> otherwise the size in bytes of the downloaded report". In other words, if 
>>> you do not provide the file path, it will be returned as a string.
>>>
>>> Regards,
>>> Anthony
>>> AdWords API Team
>>>
>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4e14bca7-9ca9-41f5-bfdd-1ff5f55c35a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to