Campaign Criterion add Platforms

351 views
Skip to first unread message

Nikola Jordanovski

unread,
Nov 30, 2015, 6:56:48 AM11/30/15
to AdWords API Forum
Hello, i am trying to set platforms to target with my adds , and it seems to update successfully but then in the ad-words tool i see this, as you can see Desktop is not set 

Thank you,
Nick

Nikola Jordanovski

unread,
Nov 30, 2015, 6:57:44 AM11/30/15
to AdWords API Forum
Code :
$campaignCriterionService =
 $this
->GetService("CampaignCriterionService", ADWORDS_VERSION);

// Create Mobile Platform. The ID can be found in the documentation.
// https://developers.google.com/adwords/api/docs/appendix/platforms
$platform
= new Platform();
$platform
->id = $platform_type; // HighEndMobile = 30001

// Create criterion with modified bid.
$criterion
= new CampaignCriterion();
$criterion
->campaignId = $campaignId;
$criterion
->criterion = $platform;

// Create operation.
$operation
= new CampaignCriterionOperation();
$operation
->operand = $criterion;
$operation
->operator = 'SET';

$operations
= array($operation);

// Make the mutate request.

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

Nadine Sundquist (AdWords API Team)

unread,
Nov 30, 2015, 5:55:25 PM11/30/15
to AdWords API Forum
Hi Nikola,

I want to make sure that I understand correctly. On the campaign, you're trying to set the checkbox next to Computers in Settings -> Devices via the API?

Cheers,
Nadine, AdWords API Team

Nikola Jordanovski

unread,
Nov 30, 2015, 6:59:59 PM11/30/15
to AdWords API Forum
Hello,
Yes , well to set either Computer or the other optima( platofrms )
Thanks
Nikola

Nadine Sundquist (AdWords API Team)

unread,
Dec 1, 2015, 10:22:10 AM12/1/15
to AdWords API Forum
Hi Nikola,

In the AdWords user interface, the check boxes next to the items under Devices can be confusing because you can't remove them. I'll look into asking the engineers to fix that to make it less confusing for the next person.

At the campaign level, the only device you can exclude is Mobile Devices. You can't remove or exclude any of the other platforms. In the API, you set the bidModifier on the CampaignCriterion Platform 30001 to 0.0. When you go to the AdWords user interface, you'll see that the Bid Adjustment is now -100%. To include Mobile Devices again, you would set the bidModifier to -1.0. Since that's not always easy to remember, we've included it in our documentation here.


I hope that clears things up for you.

Regards,
Nadine, AdWords API Team

Nikola Jordanovski

unread,
Dec 1, 2015, 11:32:28 AM12/1/15
to AdWords API Forum
Hello Nadine,
thank you for the response , the bidModifier i get, but i correct me if am wrong :
$campaignCriterionService =
 $this
->GetService("CampaignCriterionService", ADWORDS_VERSION);
// Create Mobile Platform. The ID can be found in the documentation.
// https://developers.google.com/adwords/api/docs/appendix/platforms
$platform
= new Platform();

$platform
->id = '30000'; // HighEndMobile = 30001


// Create criterion with modified bid.
$criterion
= new CampaignCriterion();
$criterion
->campaignId = $campaignId;
$criterion
->criterion = $platform;

// Create operation.
$operation
= new CampaignCriterionOperation();
$operation
->operand = $criterion;
$operation
->operator = 'SET';
$operations
= array($operation);
// Make the mutate request.
$result
= $campaignCriterionService ->mutate($operations);

-- if i run this code, it won't set Desktop as a targeted device(platform) correct?

Nadine Sundquist (AdWords API Team)

unread,
Dec 1, 2015, 12:32:01 PM12/1/15
to AdWords API Forum
Hello Nikola,

You are correct. It won't have any effect on the existing Desktop criteria because Desktop will be 'turned on' by default.

Cheers,
Nadine, AdWords API Team
Reply all
Reply to author
Forward
0 new messages