Hello Mike,
Wouldn't this approach ("you can add multiple NegativeCampaignCriterions in
a single request. You can make an array of operations to pass to the
CampaignCriterionService in one request.") cause Jake to exceed his 10,000
operations limit? (let's say he has 600 campaigns. 600 * 20 IPs is 12,000
operations).
On Thursday, October 16, 2014 at 6:25:01 PM UTC+3, Michael Cloonan (AdWords
API Team) wrote:
>
> Hello,
>
> Yes, it should be possible to add these criteria to the Campaign in bulk,
> but not quite the way you're doing. Each NegativeCampaignCriterion can only
> take one criterion, but you can add multiple NegativeCampaignCriterions in
> a single request. You can make an array of operations to pass to the
> CampaignCriterionService in one request.
>
> Regards,
> Mike, AdWords API Team
>
> On Tuesday, October 14, 2014 6:18:41 PM UTC-4, Jake Ellark wrote:
>>
>> I need to add 20 ipAddresses to a campaign IpBlock using Google Adwords
>> API. I need to conserve my API calls and potentially improve speed, so is
>> it possible to NegativeCampaignCriterion using an ipAddressArray instead of
>> one ipAddress at a time. Appreciate pointers if it is possible to add an
>> array of ipAddresses for exclusion.
>>
>> My current snippet:
>> foreach ($ipAddressExclusionsAddArray as $ipAddress) {
>> $IpBlock = new IpBlock();
>> $IpBlock->ipAddress = $ipAddress;
>> $IpBlock->type = 'IP_BLOCK';
>> $campaignCriteria = new NegativeCampaignCriterion($campaignID, null,
>> $IpBlock);
>> $addOperations[] = new CampaignCriterionOperation($campaignCriteria,
>> 'ADD');
>> } // each ip address
>>
>> My attempt to use "new NegativeCampaignCriterion($campaignID,
>> null, $ipAddressExclusionsAddArray);" without the foreach loop, resulted in
>> api error.
>>
>> Similarly, is it possible to remove an array of ipAddress exclusions.
>>
>> Appreciate your time!
>>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/7698ff66-156e-4f1c-a634-7f5a066b845e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.