Here is a sample code in Java. Basically, you don't need to set NEGATIVE
explicitly since by creating a NegativeAdGroupCriterion you're effectively
saying it's a negative keyword:
Keyword keyword = new Keyword();
keyword.setText(.....);
keyword.setMatchType(......);
NegativeAdGroupCriterion keywordNegativeAdGroupCriterion = new
NegativeAdGroupCriterion();
keywordNegativeAdGroupCriterion.setAdGroupId(........);
keywordNegativeAdGroupCriterion.setCriterion(keyword);
AdGroupCriterionOperation operation = new
AdGroupCriterionOperation();
operation.setOperand(keywordNegativeAdGroupCriterion);
operation.setOperator(Operator.ADD);
Oliver
On Wednesday, February 20, 2013 3:50:29 PM UTC, Alan Coleman wrote:
>
> Hello everyone,
>
> I'd like to set a negative keyword in an adgroup. Can I do this using
> the AdGroupCriterionService?
>
> If so where do I set the field to negative?
>
> I've been reading through the NegativeAdGroupCriterion but the
> documentation indicates that criterionUse NEGATIVE is read only.
>
>
> https://developers.google.com/adwords/api/docs/reference/v201209/AdGroupCriterionService.NegativeAdGroupCriterion
>
> Any Suggestions would be helpful.
>
> Many thanks.
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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].
For more options, visit https://groups.google.com/groups/opt_out.