AdWords and Bing Ads radius targeting in bulk

Radius targeting basics

Radius targeting is a geo-targeting method in paid search accounts to quickly select a group of towns/zips (even congressional districts) that lie within a certain distance from a selected point. For example, if you have a local business in a particular town and would like to serve ads to anyone nearby without explicitly selecting all of the towns and zip codes you’d like to target, you might specify a radius around your business location. Radius targeting is not exact. For example, if I select five miles around my address, search engine users who see my ad are not necessarily only 5 miles from my address. There are a couple reasons why:

  1. Location services by IP address are not always that accurate. For a laptop, a user’s location is approximated based on the IP assignments from an internet service provider and other calculations.
  2. When you select radius targeting, your target locations are translated into geos that the paid search program might have information about. AdWords doesn’t know your latitude and longitude when you type in a query from your laptop. Google has an idea of what town or zip code you might be in. So when you enter a radius around a point, Google includes targets that the radius crosses over. You can see the locations that your ads might be eligible to target when manually entering a radius target in AdWords. These are in the section labeled “Locations Within This Target” in the image below. For example, if I select a radius of 10 miles around Ann Arbor, MI; it is likely that my ads are eligible to show to anyone that AdWords is locating inside of Washtenaw County, and possibly even anyone inside the MI-12 congressional district, which is quite larger than Ann Arbor itself.

When using radius targeting for multiple locations it’s important to make sure your ads aren’t being distributed further than you’d like. You can test whether an AdWords ad shows using the ad preview tool. It’s also important to make sure that nearby locations in separate campaigns aren’t overlapping, or if they are overlapping, that the results are acceptable. Overlapping targeting from multiple campaigns can cause management problems inside your account. For example, let’s say I have two campaigns eligible to show ads to users in Plymouth, MI. Let’s also say that Plymouth, MI doesn’t do that well. The campaign that most consistently shows ads in Plymouth has a high cost per conversion, so you lower bids in that campaign. But without you noticing, that campaign stops distributing ads as much in Plymouth and the other campaign, which now has higher ad rank for Plymouth, starts showing ads. That campaign starts doing worse, the other campaign starts doing better. You adjust bids accordingly, and now the other campaign starts doing worse. . . so you get into a cycle.

Barring these potential difficulties, radius targeting is beneficial for ease of setup and, typically, ease of management. Particularly if you’re setting up campaigns for hundreds of locations, radius-targeting might be the way to go. So how do you setup radius targeting for hundreds of locations?

AdWords bulk radius targeting

In AdWords, you bulk add radius targets using the AdWords Editor. From the AdWords Editor menu you select “Data > Locations > Add/update multiple locations.” You include a campaign field and a location field in the bulk upload. The format of the upload looks something like this:

Campaign Location
Ann Arbor Campaign (10mi:42.284278:-83.746822)
Ann Arbor Campaign (10mi:42.282873:-83.746798)
Detroit Campaign (10mi:42.338484:-83.045934)

The format for the location field is (radius:latitude:longitude). You might not know the latitude and longitude of your locations (but you’d be surprised, in a website that has hundreds of locations, this information could be readily available). There are tools out there that can convert addresses to latitude, longitude coordinates, just google “latitude longitude bulk lookup” or “batch geocoding.”

In the sample upload, I’m adding two radius targets to a campaign called “Ann Arbor Campaign” and one radius target to “Detroit Campaign.” All targets are 10 miles around the points specified by the latitude and longitude coordinates. This can easily be scaled to hundreds of locations.

Bing Ads bulk radius targeting

Bing ads is much more difficult to bulk add radius targeting. First off, it isn’t completely compatible with AdWords radius targeting, offering specific radii options, with a 5-mile minimum. But more importantly, Bing Ads desktop editor and bulk imports don’t deal with radius targeting; you have to use the Bing Ads API. If that doesn’t sound scary to you, it probably should. But if you’re committed, here is a cursory summary of how you do it using Java:

Sign up for a Bing Ads developer token, here. You’ll also want to start a sandbox account while you’re there. After you’ve signed up for a sandbox account, bulk import a few of your campaigns from your live account. You’ll use these campaigns for testing your code.

Generate the classes for campaign management, as outlined here. You’ll want to be sure to use the same development environment described in the instructions: Axis 1.4.0 and Xerces 2.7.1; both downloadable from the web. If you use a later version of Axis, you might get unusable classes.

Write your classes for updating the targets in the Bing Ads library. This is how to proceed:

  1. Create a flat file where you set campaign IDs and latitude, longitude targets. Campaign IDs can be looked up by logging into your account from the web interface and exporting your campaigns. There is a field that includes campaign IDs. You could also look them up with the API.
  2. Create an object to parse the fields in that file so you can use it to update radius targeting for each campaign. I put the data from the file into a HashMap<Long, ArrayList<Double[]>> (Long is the campaign ID and the ArrayList is the list of coordinates).
  3. Setup your campaign management service and stubs. A basic example on getting started is here.
  4. You’re going to want to make an UpdateTargetsInLibraryRequest and GetTargetsByCampaignIdsRequest.
  5. Follow Bing’s instructions for updating/adding a radius target. Here is a section of example code for updating the location targets for a set of campaigns using the HashMap “campLatLong” described above. Use at your own risk!:
// loop through each campaign
for(Long campaignId : campLatLong.keySet()){
 // for multiple locations per campaign, add RadiusTargetBids to list
 List<RadiusTargetBid> arrayRadiusTargetBid = new ArrayList<RadiusTargetBid>();
// get the current target for the campaign so as not to overwrite other settings
// expects only 1 target to be returned. Bing only updates targets in batches,
// so it's possible to overwrite other targets.
 getTargetsByCampaignIdsRequest.setCampaignIds(new long[]{campaignId});
 getTargetsByCampaignIdsResponse = campaignManagement.getTargetsByCampaignIds(getTargetsByCampaignIdsRequest);
 Target[] targets = getTargetsByCampaignIdsResponse.getTargets();
 RadiusTarget rt = new RadiusTarget();
 Target t = targets[0];
 LocationTarget lt = new LocationTarget();
// loop through each latitude, longitude pair for the campaign
// to create new RadiusTargetBid
 for(int i = 0; i < campLatLong.get(campaignId).size(); i++){
 RadiusTargetBid radiusTargetBid = new RadiusTargetBid();
 radiusTargetBid.setLatitudeDegrees(campLatLong.get(campaignId).get(i)[0]); 
 radiusTargetBid.setLongitudeDegrees(campLatLong.get(campaignId).get(i)[1]); 
 radiusTargetBid.setIncrementalBid(IncrementalBidPercentage.fromString("ZeroPercent"));
 radiusTargetBid.setRadius(RADIUS);
 arrayRadiusTargetBid.add(radiusTargetBid);
 }
// assign RadiusTargetBids to your new RadiusTarget, assign your new RadiusTarget 
// to your new LocationTarget, set the new location target for your campaign's Target.
 rt.setBids(arrayRadiusTargetBid.toArray(new RadiusTargetBid[0]));
 lt.setRadiusTarget(rt);
 t.setLocation(lt);
 t.setIsLibraryTarget(null);
// update the Target for your campaign to the newly created target with updated 
// radius targeting, erasing the old location targeting.
 System.out.println("Calling CampaignManagement.updateTargetsInLibrary");
 updateTargetsInLibraryResponse = 
 campaignManagement.updateTargetsInLibrary(new UpdateTargetsInLibraryRequest(new Target[]{t}));
}

 Bulk radius targeting in paid search

That’s how you radius target in paid search. When considering location targeting there are more options than just radius targeting; in fact, radius targeting settings are really just the tip of the iceberg. For greater reach and even greater simplicity in creating AdWords/Bing compatible campaigns, you might consider DMA targeting. In the least, it would help you avoid using the Bing Ads API. Other important considerations when selecting your location settings are “Advanced Location Options” and analysis of location data inside Enhanced campaigns. You’ll want to weigh your options before selecting a radius targeting methodology, particularly in large accounts.

Scroll to Top