Are there any Ruby code examples for adding location with radius setting to target campaign ?

15 views
Skip to first unread message

ETERNA

unread,
Jun 5, 2020, 12:08:06 PM6/5/20
to AdWords API and Google Ads API Forum
Hello there, i just stuck on implementing part of adding location to campaign via AdWords API. I have found good examples in doc according to add location like city, country etc.
But now i need implement part with radius criteria and didn't succeed in finding of example how to do it via API in docs.

I have found in docs info like that:
- The code to create a proximity target is similar to adding a location target, except that you have to create a Proximity object instead of a Location object.

but in ruby examples code i don't need to create any object to successfully add location to campaign.

Any suggestions will really appreciated.

Google Ads API Forum Advisor Prod

unread,
Jun 5, 2020, 2:15:36 PM6/5/20
to etern...@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out. You can accomplish this by following the example here and creating a LocationGroup. Similarly, you can create a Proximity criterion as explained here and add it to the campaign using the CampaignCriterionService. Unfortunately, there are no examples available for this but it would follow a very similar format as the other linked example.

Regards,
Mitchell
Google Ads API Team

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