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