How to post ads based on the location using google adwords api

50 views
Skip to first unread message

Shobhan Babu

unread,
Jan 16, 2015, 1:19:06 AM1/16/15
to adwor...@googlegroups.com
Hi,

I want to post the ads based on the location ,how can we do this thing based on the location, I have searched for api,but unfortunately I didn't get any code for this .

could you please tell me how to post the ads based on the location or city.


Thank you

Anash P. Oommen (AdWords API Team)

unread,
Jan 16, 2015, 7:13:16 AM1/16/15
to adwor...@googlegroups.com
Hi Shobhan,

I'm not 100% clear on what you are trying to achieve, but my guess is that you want to have different ads for different geographic locations. If yes,

- Create a campaign + adGroup for the location you want to target using CampaignService and AdGroupService.
- Create your location-specific ads in that campaign using AdGroupAdService.
- Target your campaign to serve in the desired geo location. Add a Location criterion using CampaignCriterionService. The location IDs are available on https://developers.google.com/adwords/api/docs/appendix/geotargeting

Here are some C# code examples that you can refer to:

Shobhan Babu

unread,
Jan 16, 2015, 9:07:15 AM1/16/15
to adwor...@googlegroups.com

How do we target our ads only on particular geographical location ?

Is there any API for this ,if it available ,Can you please provide this API in PHP rather than C language

Thank you

Anash P. Oommen (AdWords API Team)

unread,
Jan 19, 2015, 12:54:11 AM1/19/15
to adwor...@googlegroups.com
Hi Shobhan,

To target your ads to only a particular geographic region, you need to add location targets to your campaign. This can be done using CampaignTargetingService. See the PHP example at https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201409/Targeting/AddCampaignTargetingCriteria.php

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Shobhan Babu

unread,
Mar 11, 2015, 8:50:25 AM3/11/15
to adwor...@googlegroups.com
How can we get the location Id of indian cities ...! 

Anash P. Oommen (AdWords API Team)

unread,
Mar 11, 2015, 4:14:28 PM3/11/15
to adwor...@googlegroups.com
Hi Shobhan,

On https://developers.google.com/adwords/api/docs/appendix/geotargeting, set the filter type to City, and search for CountryCode = IN.

Cheers,
Anash P. Oommen,
AdWords API Advisor.

Reply all
Reply to author
Forward
0 new messages