RE: [Google Ads API Python Library] - How to set the bidding strategy when the bidding strategy has data type of 'MESSAGE'?

96 views
Skip to first unread message

Google Ads API Forum Advisor Prod

unread,
Jul 8, 2019, 4:41:57 PM7/8/19
to mmirand...@gmail.com, adwor...@googlegroups.com
Hi Miguel,

Thanks for the question. The Java and PHP libraries are setting the maximum_conversion_value field, not the maximize_conversions field. These are technically two different bidding strategies, but below are examples of how to set both:

maximize_conversion_value:

campaign.maximize_conversion_value.target_roas.value = 3.5

maximize_conversions:

This field admittedly has a very confusing interface because it's represented by an empty proto object, as defined here. In the Python implementation of protobufs you can't assign to nested proto objects directly, you need to use the CopyFrom method:

max_conversions_proto = client.get_type('MaximizeConversions')

campaign.maximize_conversions.CopyFrom(max_conversions_proto)

If you were to log the campaign object after this sequence it should look something like this:

maximize_conversions {
}


Hope that helps! If you have additional questions or feedback related to the Python library please feel free to open an Issue on the GitHub repository directly.

Best,
Ben Karl, Google Ads API Team

ref:_00D1U1174p._5001UBo9Ix:ref
Reply all
Reply to author
Forward
0 new messages