Hi Denma,

Sorry I misled you in my previous message, you are right, SET is the operator 
to use here.

I was able to set a Platform criteria to target mobile phone devices for a 
campaign that initially had it disabled in the settings. I did it using the 
following code in PHP:

        $campaignCriterionService = $adWordsServices->get($session, 
CampaignCriterionService::class);
        
        // Add a device criterion.
        $mobile = new Platform();
        $mobile->setId(30001);
        $mobileCriterion = new CampaignCriterion(
            $campaignId,
            null,
            $mobile,
            5,
            CampaignCriterionCampaignCriterionStatus::ACTIVE
        );

        $operation = new CampaignCriterionOperation();
        $operation->setOperator(Operator::SET);
        $operation->setOperand($mobileCriterion);
        $operations[] = $operation;

        $result = $campaignCriterionService->mutate($operations);


Once executed, I refreshed the Google Ads UI completely and could see it 
reflected at two locations under my campaign:

"Devices" menu on the left: the bid adjustment for the "Mobile phones" device 
is now +400%
In the campaign settings: under "Devices" I can see that "Mobile phones" is now 
selected

Could you share more detail about the initial campaign targeting settings? 
Also, what exact modifications do you expect to see after a successful API call 
and where on the UI?

Thanks,
ref:_00D1U1174p._5004Q22YBAh: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/BHelp000000000000000000000000000000000000000000000QG069H007Gjq3CywTfGVwUnVGKYuOw%40sfdc.net.

Reply via email to