Also in the above code example I do not know how to match 
`$recommendedAd->getMatchType()` numeric value to its actual text value 
like (2=> Exact, 4 => Broad).

On Tuesday, May 5, 2020 at 10:45:37 PM UTC+5:30, Shiv Kumar wrote:
>
> The issue I am facing is that the google PHP library wrapper doesn't tell 
> which function to use for each type of recommendation report for example : 
>
> foreach ($response->iterateAllElements() as $googleAdsRow) {
>             /** @var GoogleAdsRow $googleAdsRow */
>             $recommendation = $googleAdsRow->getRecommendation();
>
> $recommendedAd = $recommendation->getKeywordRecommendation()->getKeyword();
>                 
>  if (!is_null($recommendedAd->getText())) {
>     $recommendedExpandedTextAd = $recommendedAd->getText();
>
>
>
> }
>
>
> So above code sample shows use of 
> "$recommendation->getKeywordRecommendation()->getKeyword();" 
> these 2 functions on the retrieved data object, I had to guess these 
> function names as there was no mention in PHP wrapper for the API neither 
> in the google ads doc. So I was hoping there are more examples for other 
> recommendation report types so I don't have to guess the function names.
>
>
> On Tuesday, May 5, 2020 at 7:36:46 PM UTC+5:30, adsapiforumadvisor wrote:
>>
>> Hi Shiv,
>>
>> Thank you for reaching out. You can see here 
>> <https://developers.google.com/google-ads/api/docs/samples/get-text-ad-recommendations#php>
>>  
>> for an example of getting all Text Ad recommendations. This example uses 
>> the recommendation report 
>> <https://developers.google.com/google-ads/api/fields/v3/recommendation> 
>> so you can modify it by using the different attributes listed there. For 
>> example, to get recommendations of type KEYWORD, you can change 'WHERE 
>> recommendation.type = TEXT_AD' to be 'WHERE recommendation.type = KEYWORD' 
>> and make sure you add recommendation.keyword_recommendation 
>> <https://developers.google.com/google-ads/api/fields/v3/recommendation#recommendation.keyword_recommendation>
>>  
>> to your SELECT clause. You can find the available recommendation types for 
>> the report here 
>> <https://developers.google.com/google-ads/api/fields/v3/recommendation#recommendation.type>
>> .
>>
>> Regards,
>> Mitchell
>> Google Ads API Team
>>
>> ref:_00D1U1174p._5004Q1zK8TD:ref
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0162adac-33d6-4ea2-9777-26be77d9a8e8%40googlegroups.com.

Reply via email to