Currently using the latest API version for PHP (V15). We are trying to 
specify a campaign’s ‘Devices’ setting, adding it as a ‘Campaign Criterion’ 
(ref. 
https://developers.google.com/google-ads/api/reference/rpc/v15/CampaignCriterion).The
 
operation is inside a list of operations as it follows: 

// Adapted from extract code for testing values based on class Device

// Google\Ads\GoogleAds\V15\Enums\DeviceEnum\Device.php

$operations = [];

$devices = ['MOBILE', 'TABLET']; 

foreach ($devices as $device) {

$operations[] = new MutateOperation([

'campaign_criterion_operation' => new CampaignCriterionOperation([

'create' => new CampaignCriterion([

'campaign' => ResourceNames::forCampaign($customer_id, $campaign_temp_id),

'type' => CriterionType::DEVICE,

'negative' => false,

'status' => CampaignCriterionStatus::value('ENABLED'),

//'bid_modifier' => 0.5,

'device' => new DeviceInfo([

'type' => Device::value($device)

])

])

])

]);

}

$service_client = $ads_client->getGoogleAdsServiceClient();

$response = $service_client->mutate($customer_id, $operations);

 

The actions for those ‘Devices’ operations run normally, without showing 
any error, it even returns a resource name. The thing here is that, the 
change doesn’t seems to be shown as expected on the Google UI.

*Current behavior*
[image: image_2024_02_12T18_16_38_818Z.png]
*Expected behavior based on selected options*
[image: image_2024_02_12T18_16_55_009Z.png]

The available options are set based on ‘DeviceEnum\Device.php’ (ref. 
https://github.com/googleads/google-ads-php/blob/main/src/Google/Ads/GoogleAds/V15/Enums/DeviceEnum/Device.php).

On Thursday, February 8, 2024 at 9:11:44 PM UTC-5 Google Ads API Forum 
Advisor wrote:

> Hi Fernec,
>
> Thank you for reaching out to the Google Ads API support team.
>
> By reviewing your concern, I understand that you're attempting to adjust 
> campaign targeting by using the "Criteria 
> <https://developers.google.com/google-ads/api/docs/targeting/criteria>" 
> but you're not observing any modifications in the campaign's targeting 
> specifics. Can you please share under which Enums 
> <https://developers.google.com/google-ads/api/reference/rpc/v14/DeviceEnum.Device>
>  
> you have added the device targeting and what you are able to find from the 
> UI. In order to investigate your issue further, kindly provide us with the 
> complete successful API logs (request 
> <https://developers.google.com/google-ads/api/docs/start> and response 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
>  with request-id  
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
> and request header 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>)
>  
> along with the uncropped UI screenshot generated at your end.
>
> If you are using a client library and haven't enabled the logging yet, I 
> would request you to enable logging for the specific client library that 
> you are using. You can refer to the guide PHP 
> <https://developers.google.com/google-ads/api/docs/client-libs/php/logging> 
> to 
> enable logging at your end. For REST interface requests, you can enable 
> logging via the curl command by using the -i flag.
>   
> This message is in relation to case "ref:!00D1U01174p.!5004Q02ryy84:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/24b19dfd-6920-45b8-aedc-2fc160cc3300n%40googlegroups.com.

Reply via email to