Hi,
As described in the previous response, you will need to use the
AdGroupCriterionService
<https://developers.google.com/adwords/api/docs/reference/latest/AdGroupCriterionService>
and set the bidModifier
<https://developers.google.com/adwords/api/docs/reference/v201710/AdGroupCriterionService.BiddableAdGroupCriterion#bidmodifier>
attribute
as shown in the code snippet below :
$adGroupCriterionService = $adWordsServices->get($session,
AdGroupCriterionService::class);
$operations = [];
$genderTarget = new Gender();
$genderTarget->setId(10);
$genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();
$genderBiddableAdGroupCriterion->setAdGroupId($adGroupId);
$genderBiddableAdGroupCriterion->setCriterion($genderTarget);
$genderBiddableAdGroupCriterion->setBidModifier(1.1);
$genderBiddableAdGroupCriterionOperation = new AdGroupCriterionOperation
();
$genderBiddableAdGroupCriterionOperation->setOperand(
$genderBiddableAdGroupCriterion);
$genderBiddableAdGroupCriterionOperation->setOperator(Operator::SET);
$operations[] = $genderBiddableAdGroupCriterionOperation;
$result = $adGroupCriterionService->mutate($operations);
Let me know if you face any issues while trying this out.
Thanks,
Sreelakshmi, 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 [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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/f75123c6-9c5a-470f-86a3-78e167ee4961%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.