Let me try with this code and get back to you.

On Wednesday, September 2, 2020 at 4:52:56 AM UTC+5:30, adsapiforumadvisor 
wrote:
>
> 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 [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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1cf3784d-d134-440e-8c0c-ae96ea0f9499o%40googlegroups.com.

Reply via email to