How could I set bidding strategy to TARGET_SPEND

38 views
Skip to first unread message

Rukeith Tseng

unread,
Nov 16, 2020, 9:57:29 PM11/16/20
to AdWords API and Google Ads API Forum
I want to set my campaing's bidding strategy to TARGET_SPEND.
Unfortunately, I couldn't find any examples for this.
I set 
campaign.bidding_strategy_type = client.get_type("BiddingStrategyTypeEnum", version="v6").TARGET_SPEND

But it didn't work. 
How could I set bidding strategy to TARGET_SPEND?

Google Ads API Forum Advisor Prod

unread,
Nov 17, 2020, 3:15:50 PM11/17/20
to rukeit...@mile.cloud, adwor...@googlegroups.com

Hi Rukeith,

Thank you for reaching out. This code snippet shows where you could set the TARGET_SPEND as the bidding strategy.

Thanks and regards,
Xiaoming, Google Ads API Team

 

Google Logo
Xiaoming
Google Ads API Team
 


ref:_00D1U1174p._5004Q27uO3F:ref

Rukeith Tseng

unread,
Nov 17, 2020, 9:50:37 PM11/17/20
to AdWords API and Google Ads API Forum

Sorry about my description.
I am using the Google Ads API not the old Adwords API.
I could not figure out the method to set the bidding strategy from the code snippet.
adsapiforumadvisor 在 2020年11月18日 星期三上午4:15:50 [UTC+8] 的信中寫道:

Google Ads API Forum Advisor Prod

unread,
Nov 18, 2020, 2:26:59 PM11/18/20
to rukeit...@mile.cloud, adwor...@googlegroups.com

Hi Rukeith,

Thank you for reaching out. For the Google Ads API, you could refer to this code snippet on how to enable the TARGET_SPEND bidding strategy.



Thanks and regards,
Xiaoming, Google Ads API Team

 

Rukeith Tseng

unread,
Nov 18, 2020, 9:20:41 PM11/18/20
to AdWords API and Google Ads API Forum
Hi,
    I have tried a few ways to enable TARGET_SPEND, but it still not work.

1. 
campaign.target_spend.target_spend_micros = 10000000

2. 
campaign.target_spend = Ture

3. 
campaign.target_spend = Ture
fm = protobuf_helpers.field_mask(None, campaign)
fm.paths.append("target_spend")
campaign_operation.update_mask.CopyFrom(fm)


adsapiforumadvisor 在 2020年11月19日 星期四上午3:26:59 [UTC+8] 的信中寫道:

Google Ads API Forum Advisor Prod

unread,
Nov 19, 2020, 4:13:30 PM11/19/20
to rukeit...@mile.cloud, adwor...@googlegroups.com

Hi Rukeith,

Thank you for reaching out. In order to set the TARGET_SPEND bidding strategy to a campaign you need to create the bidding strategy first and then set the bidding_strategy_id to campaign.bidding_strategy. Please refer to this sample code on how to implement it.



Thanks and regards,
Xiaoming, Google Ads API Team

 

Reply all
Reply to author
Forward
0 new messages