The code sample in
https://developers.google.com/google-ads/api/docs/conversions/upload-clicks?hl=en#python seems to have an issue.
This line request.conversions = [click_conversion] returns an error:
AttributeError: Assignment not allowed to repeated field "conversions" in protocol message object.
My click_conversions looks like:
gclid: "Cj0KCQiAw9qOBhC-ARIsAG-rdn7H0PLLPzj19IIWAKcoYz63zoYwV4Ca-_82RkyvIVAVPSGTHvHpnAIaAi5_EALw_wcB"
conversion_action: "customers/000000000/conversionActions/000000"
conversion_date_time: "2022-01-06 19:30:06+02:00"
conversion_value: 1.28
currency_code: "USD"
custom_variables {
conversion_custom_variable: "type"
value: "purchase"
}
I suppose one is not allowed to assign to repeated fields but I don't see how to proceed. I think appending with request.conversions.append(click_conversion) creates a malformed request.
Anyone got a clue on how to get this to work?
Thank you for your help