AdGroup Level Search Remarketing with Adwords API/PHP Library

2015-02-16 Thread Denys Kovalenko
Hi guys,

I'm struggling to find an example of a script to add a new AdGroup and 
assign "Target and Bid" to Targeting Settings and Add Remarketing Lists to 
Audiences by List Id.

Can someone help please?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/1db09ab5-3475-40f8-b51a-c845976b5495%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdGroup Level Search Remarketing with Adwords API/PHP Library

2015-02-17 Thread Denys Kovalenko
Thanks Josh,

Thought it took me sometime to figure out how to do N2 :), its working fine 
now, appreciate your help!

On Monday, February 16, 2015 at 10:12:10 AM UTC, Denys Kovalenko wrote:
>
> Hi guys,
>
> I'm struggling to find an example of a script to add a new AdGroup and 
> assign "Target and Bid" to Targeting Settings and Add Remarketing Lists to 
> Audiences by List Id.
>
> Can someone help please?
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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/a083d4a5-6e96-4296-b354-937097dd7441%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Additional headline (headlinePart3) and description (description2) for ExpandedTextAds

2018-11-12 Thread Denys Kovalenko
Any updates on this one? This seems to me still not available in latest 
release. HeadlinePart3 is still missing from fields 
https://developers.google.com/adwords/api/docs/appendix/selectorfields#v201809-AdGroupAdService
 
and adding it to fields throwing an error: 
INVALID_FIELD_NAME

Thanks. 



On Monday, August 13, 2018 at 1:25:22 PM UTC+1, 
tim@smarter-ecommerce.com wrote:
>
> Dear API-Team,
>
> will the upcoming release of the Google Ads API include support for the 
> newly announced third headline and the additional description in 
> ExpandedTextAds? (https://support.google.com/google-ads/answer/1704389, 
> https://support.google.com/google-ads/answer/9100171)
> If so, will they be required or optional fields?
>
> Regards
> tim
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/157a1164-4ae4-48d2-a789-fe946fe7745a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Additional headline (headlinePart3) and description (description2) for ExpandedTextAds

2018-11-12 Thread Denys Kovalenko
Thanks for your answer. It looks from the docs, I should be able to add, 
but first I need to Get existing Ads to merry this to our backend, and I 
can't do it. Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/666cedc9-8369-4da7-a67c-16e5c7bff71a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Additional headline (headlinePart3) and description (description2) for ExpandedTextAds

2018-11-13 Thread Denys Kovalenko
Hi Sai,

Yes, please. This example doesn't work with HeadLine3

https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/BasicOperations/GetExpandedTextAds.php

$selector->setFields(
['Id', 'Status', 'HeadlinePart1', 'HeadlinePart2', 'Description']
);

If I add HeadlinePart3 in list of fields it will throw an exception.

Same, including Headline3 in after this line will not work (because its not
in fields):

https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/BasicOperations/GetExpandedTextAds.php#L91

Thanks, Denys.

On Tue, 13 Nov 2018 at 19:43, 'Teja Makani' via AdWords API and Google Ads
API Forum  wrote:

> Hello Denys,
>
> If you have any further questions please elaborate. I am glad to help.
>
> Regards,
> Sai Teja, AdWords API Team.
>
> On Monday, August 13, 2018 at 8:25:22 AM UTC-4,
> tim.wl...@smarter-ecommerce.com wrote:
>>
>> Dear API-Team,
>>
>> will the upcoming release of the Google Ads API include support for the
>> newly announced third headline and the additional description in
>> ExpandedTextAds? (https://support.google.com/google-ads/answer/1704389,
>> https://support.google.com/google-ads/answer/9100171)
>> If so, will they be required or optional fields?
>>
>> Regards
>> tim
>>
> --
> --
> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
> 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 a topic in the
> Google Groups "AdWords API and Google Ads API Forum" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/adwords-api/23fPJ3b4BE4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> adwords-api+unsubscr...@googlegroups.com.
> Visit this group at https://groups.google.com/group/adwords-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/adwords-api/e94f7341-a99b-4cbf-a678-2e448768a8a8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/CAFsA_jBfZVHNyVFjhoYGerMNxbPhmGzzfOfFEbeugWSAWvGJ_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Additional headline (headlinePart3) and description (description2) for ExpandedTextAds

2018-11-14 Thread Denys Kovalenko
Thanks! Exactly what I was looking for!  Thanks very much!

Denys.

On Wed, 14 Nov 2018 at 07:13, Tim Wlcek 
wrote:

> Hi Denys,
>
> I think that within a selector you have to use ExpandedTextAdHeadlinePart3.
> Check the API Reference here:
>
> https://developers.google.com/adwords/api/docs/reference/v201809/AdService.ExpandedTextAd
> Regards
> tim
>
> On Tue, Nov 13, 2018 at 9:23 PM Denys Kovalenko  wrote:
>
>> Hi Sai,
>>
>> Yes, please. This example doesn't work with HeadLine3
>>
>>
>> https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/BasicOperations/GetExpandedTextAds.php
>>
>> $selector->setFields(
>> ['Id', 'Status', 'HeadlinePart1', 'HeadlinePart2', 'Description']
>> );
>>
>> If I add HeadlinePart3 in list of fields it will throw an exception.
>>
>> Same, including Headline3 in after this line will not work (because its
>> not in fields):
>>
>>
>> https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/BasicOperations/GetExpandedTextAds.php#L91
>>
>> Thanks, Denys.
>>
>>
>> On Tue, 13 Nov 2018 at 19:43, 'Teja Makani' via AdWords API and Google
>> Ads API Forum  wrote:
>>
>>> Hello Denys,
>>>
>>> If you have any further questions please elaborate. I am glad to help.
>>>
>>> Regards,
>>> Sai Teja, AdWords API Team.
>>>
>>> On Monday, August 13, 2018 at 8:25:22 AM UTC-4,
>>> tim.wl...@smarter-ecommerce.com wrote:
>>>>
>>>> Dear API-Team,
>>>>
>>>> will the upcoming release of the Google Ads API include support for the
>>>> newly announced third headline and the additional description in
>>>> ExpandedTextAds? (https://support.google.com/google-ads/answer/1704389,
>>>> https://support.google.com/google-ads/answer/9100171)
>>>> If so, will they be required or optional fields?
>>>>
>>>> Regards
>>>> tim
>>>>
>>> --
>>> --
>>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>>> 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 a topic in the
>>> Google Groups "AdWords API and Google Ads API Forum" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/adwords-api/23fPJ3b4BE4/unsubscribe.
>>> To unsubscribe from this group and all its topics, send an email to
>>> adwords-api+unsubscr...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/adwords-api.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/adwords-api/e94f7341-a99b-4cbf-a678-2e448768a8a8%40googlegroups.com
>>> <https://groups.google.com/d/msgid/adwords-api/e94f7341-a99b-4cbf-a678-2e448768a8a8%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> --
>> =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
>> 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 a topic in the
>> Google Groups "AdWords API and Google Ads API Forum" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/adwords-api/23fPJ3b4BE4/unsubscribe.
>> To unsub

Promotion Extension via API

2019-02-25 Thread Denys Kovalenko

Re: API, PHP Library: https://github.com/googleads/googleads-php-lib

https://support.google.com/google-ads/answer/7367622?hl=en

Hi guys, I can't find any references or example on how to create AdGroup 
Level Promotion Extension with API. Extensions folder 
https://github.com/googleads/googleads-php-lib/tree/master/examples/AdWords/v201809/Extensions
 
does not have any examples on that. I tried to make it similar 
to 
https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201809/Extensions/AddPrices.php,
 
but something isn't right. Can someone point me to the right direction 
please?

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/414200c2-ec08-4a17-a1c4-95fe033ebbc4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


A Report to download all Placeholders: sitelink (including zero-impressions)

2016-10-03 Thread Denys Kovalenko
Hi,

I'm looking for a way to download all the sitelinks on account (per ad 
group level) - looks like all the reports available, do not offer sitelinks 
without impressions.

The reason for this report, to determine which AdGroups already have 
sitelinks to upload new sitelinks to ONLY groups which don't, perhaps there 
is another way?

Thanks.

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/29678d84-ade6-4fff-b745-cf1540869594%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: A Report to download all Placeholders: sitelink (including zero-impressions)

2016-10-04 Thread Denys Kovalenko
Thanks Shwetha,

I used those two, but they returned with "0" value: targetCampaignID='0' 
targetAdGroupID='0'

My goal is to find all adGroups without sitelinks, how can I achieve this, 
if I don't have adGroupId?

Thanks.

On Monday, October 3, 2016 at 9:26:56 PM UTC+1, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> Hi Denys,
>
> You can use Placeholder Feed Item Report 
> 
>  to 
> get sitelink extensions in your account. You should use 
> *TargetingAdGroupId* and *TargetingCampaignId* fields instead of 
> *CampaignId* and *AdGroupId* fields as these support zero impressions.You 
> need to use the *PlaceholderType* value to distinguish between different 
> types of extensions in this report. A list of all the placeholder types and 
> fields is available in the Placeholder reference page 
> .
>
> Regards,
> Shwetha, 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ce64a98c-fb93-4479-8625-44f947d32b60%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: A Report to download all Placeholders: sitelink (including zero-impressions)

2016-10-04 Thread Denys Kovalenko
Hi,
Thanks for your advice, but AdGroupExtensionSettingService 

 is 
not a report, which means a huge overhead on API (unless I can do bulk 
operations?), we are talking about of thousands of groups. If think I'd 
rather make an internal site-link accounting system if there is no report 
to show AdGroups with Sitelink Extensions.

Thanks for looking anyway.

Regards, Denys.


On Tuesday, October 4, 2016 at 7:23:05 PM UTC+1, Shwetha Vastrad (AdWords 
API Team) wrote:
>
> Hi Denys,
>
> Upon further investigation, I found that the TargetingCampaignId and 
> TargetingAdGroupId are pulled from the feed data rather than the extension 
> setting data. To get a list of AdGroups which don't have any sitelink 
> extensions, do the following:
>
>1. Use AdGroupService 
>
> 
> or AdGroup Performance Report 
>
> 
>  to 
>get a list of all the AdGroups in your account.
>2. Use AdGroupExtensionSettingService 
>
> 
>  to 
>get a list of all adgroup-level sitelink extensions (make sure to add a 
>predicate to filter only sitelinks).
>3. Remove AdGroups from step 2 from the list obtained in step 1 to get 
>all the AdGroups without sitelink extensions.
>
> Let me know if this works.
>
> Thanks,
> Shwetha, 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/92c1c345-3503-40e5-8ed8-26f3ce2345ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PHP Lib] Handling two policy exception in ErrorHandling/HandlePolicyViolationError.php

2017-08-20 Thread Denys Kovalenko
Hi,

In case when two policy exceptions are thrown, for example, in finalURL and 
Headline1 (which is possible to request via GUI) , the 
$operation->setExemptionRequests 
won't allow to add both to $exemptionRequests array, which makes it 
*impossible* to create an ExpandedTextAd via API.

Code example is here, 
https://github.com/googleads/googleads-php-lib/blob/0e091088ae3a0deb2e09927042bcc4a8372625a2/examples/AdWords/v201708/ErrorHandling/HandlePolicyViolationError.php#L104
 tested 
on the latest v201708, Release 28.1.0. Previous code versions also didn't 
work.


I was told that code example in Java works, but I'm unable to make any 
changes to hardcoded function/methods of a library, to make it working in 
PHP. 

I would appreciate any help/suggestions.

Thanks.


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/58816e3e-8cae-4f18-9e2b-32f61a09ceeb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [PHP Lib] Handling two policy exception in ErrorHandling/HandlePolicyViolationError.php

2017-08-21 Thread Denys Kovalenko
Hi Peter,

Thank you for your answer. There is no error message as such, to validate 
the Ad Text the code uses $this->session->setValidateOnly(true); first, 
then ApiException is caught and code adds exemption to operation by using 
$operation->setExemptionRequests([new ExemptionRequest($error->getKey())]) 
but in PHP library it only adds one exception to array, where 2 needed. So 
next step code executes mutate() with $this->session->setValidateOnly(false
); but it will not pass as PolicyViolationError will be thrown.

It it helps I have response object from the library error handling:

Google\AdsApi\AdWords\v201708\cm\PolicyViolationError Object ( [key:
protected] => Google\AdsApi\AdWords\v201708\cm\PolicyViolationKey Object ( [
policyName:protected] => tobacco [violatingText:protected] => cigarettes ) [
externalPolicyName:protected] => Tobacco and Cigarettes [externalPolicyUrl:
protected] => [externalPolicyDescription:protected] => Google does not 
permit the advertisement of tobacco and tobacco-related products. Please 
see our full policy 

. [isExemptable:protected] => 1 [violatingParts:protected] => Array ( [0] => 
Google\AdsApi\AdWords\v201708\cm\PolicyViolationErrorPart Object ( [index:
protected] => 0 [length:protected] => 10 ) ) [fieldPath:protected] => 
operations[0].operand.ad.finalUrls [fieldPathElements:protected] => Array ( 
[0] => Google\AdsApi\AdWords\v201708\cm\FieldPathElement Object ( [field:
protected] => operations [index:protected] => 0 ) [1] => Google\AdsApi\
AdWords\v201708\cm\FieldPathElement Object ( [field:protected] => operand [
index:protected] => ) [2] => Google\AdsApi\AdWords\v201708\cm\
FieldPathElement Object ( [field:protected] => ad [index:protected] => ) [3] 
=> Google\AdsApi\AdWords\v201708\cm\FieldPathElement Object ( [field:
protected] => finalUrls [index:protected] => ) ) [trigger:protected] => [
errorString:protected] => PolicyViolationError.POLICY_ERROR [ApiErrorType:
protected] => PolicyViolationError [parameterMap:Google\AdsApi\AdWords\
v201708\cm\ApiError:private] => Array ( [ApiError.Type] => ApiErrorType ) )


I'm unable to use out of the library code as a whole project is deeply 
integrated with PHP Library methods.

Thanks. 


On Monday, August 21, 2017 at 4:59:22 AM UTC+1, Peter Oliquino wrote:
>
> Hi Denys,
>
> You should be able to send an array of ExemptionRequests 
> 
>  regardless 
> of the client library you use. However, to further investigate, could you 
> provide any logs such as the SOAP request and response that my contain an 
> error message? If you haven't enabled SOAP logging yet, you may refer to 
> this guide 
>  as 
> to how. You may reply using *Reply privately to author*.
>
> Best regards,
> Peter
> 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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3b9d247f-072b-4a16-a59d-fbf9c3440aa6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.