REST Api and Updating Campaign Bidding Strategy

161 views
Skip to first unread message

marketing marketing

unread,
Oct 9, 2019, 2:20:02 PM10/9/19
to AdWords API and Google Ads API Forum
I am migrating from the old API where I used to do 

$bidding = new BiddingStrategyConfiguration();
$bidding->setBiddingStrategyType("whatever");
$campaign->setBiddingStrategyConfiguration($bidding);

And than push the updated campaign

For the new api I checked some post and example but they are either for a brand new campaign... or do not work!


If I execute a code like

$campaign = new Campaign([
    'resource_name' => ResourceNames::forCampaign($customerId, $campaignId)
]);

$campaign->setMaximizeConversions(new MaximizeConversions());

And than push I will end up with this json

{
"customerId": "XYZ",
"operations": [{
"updateMask": "resourceName",
"update": {
"resourceName": "customers\/XYZ\/campaigns\/ABC",
"maximizeConversions": {}
}
}]
}

I receive a "valid" response like

{
"results": [{
"resourceName": "customers/XYZ/campaigns/ABC"
}]
}

But nothing is happening...

DId anyone can help me ?

Do I must use portfolio bidding strategy ?

Google Ads API Forum Advisor Prod

unread,
Oct 9, 2019, 3:43:35 PM10/9/19
to mark...@talentstechmedia.com, adwor...@googlegroups.com
Hello,

You have to use the similar campaign update operations and set the bidding strategy type for campaign. In the thread you pointed they applied bidding strategy using ".setMaximizeConversions(MaximizeConversions.newBuilder().build()) ". Also, you can refer the code sample here to set the bidding strategy. Please let me know if you have any further questions. 

Regards,
Sai Teja, Google Ads API Team

ref:_00D1U1174p._5001UKMlmO:ref
Message has been deleted

Roy Bellingan

unread,
Oct 9, 2019, 8:06:14 PM10/9/19
to AdWords API and Google Ads API Forum
Than you very much for the quick reply Teja,

I tried what I think is a functionally equivalent code in the php sdk (as expressed in the opening post.)

         $campaign->setMaximizeConversions(new MaximizeConversions());

But nothing is happening. The remote campaign is not UPDATED....

In any case I will try from the java sdk for curiosity....

Google Ads API Forum Advisor Prod

unread,
Oct 10, 2019, 1:50:07 PM10/10/19
to tsm...@gmail.com, adwor...@googlegroups.com
Hello Roy,

I have changed the bidding strategy to TARGET_SPEND attached the request and response log. However you cannot directly change to maximize conversion for the shared budgets, you have to create/use the existing portpoli bidding strategies using setBiddingStrategy(bidding strategy resource name) Please give it a try and let me know if you have any further questions.
requesr_responseLog biddingStgy.txt

Roy Bellingan

unread,
Oct 10, 2019, 2:32:21 PM10/10/19
to AdWords API and Google Ads API Forum
Thank you for the clarification!
Reply all
Reply to author
Forward
0 new messages