Hi Patrick,
Thank you for posting your concern.
I am afraid that there is no sample code for targeting user interest (Affinity and in-market) at ad group level. However, I would suggest you utilize this
sample code as your base code because the setting of user interest should be similar to the sample implementation. Also, since your concern is more code related, I would suggest reaching out to the author of the PHP client library via this
link as they are more equipped to this topic.
Furthermore, it appears that you are using the correct
service,
operation and
object for associating user interest at ad group level.
As for your question on how to add the criteria as observation, set
bid_only to
true, the targeting setting will be set to "Observation", and the criteria won't be used to restrict traffic, but will allow you to bid differently for different users on your lists. Setting
bid_only to
false sets targeting setting to "Targeting" and enables the criteria to restrict ad group traffic only to users on the targeted list.
Let me know if you have further questions.
Regards,
 |
| Ernie John |
| Google Ads API Team |
|
|
| |

ref:_00D1U1174p._5004Q2Yono4:ref