Showing posts with label location. Show all posts
Showing posts with label location. Show all posts

Discover v201101 - Advanced geo-targeting using Location of Presence or Area of Interest

Tuesday, April 26, 2011


AdWords allows you to target your users based on their Location of Presence (LOP) or Area of Interest (AOI). This feature is now available to developers through AdWords API v201101 and this blog post discusses how to use this new AdWords API feature.

This blog post assumes that are familiar with how to set geographic targets on your campaign. If not, you can learn more here. For a refresher on where regionally targeted ads appear, you can refer to the AdWords Help Center article here.

Introduction

To understand how LOP or AOI based geo-targeting works, consider the following example:

You own a flower shop in New York. You run a campaign that targets New York, and one of your keywords is “flowers”. The following table shows how Google serves ads if you use LOP and AOI settings.

Target Method User Location (LOP) User Query User’s Area of Interest (AOI) User sees Ad
LOP only New York flowers  
California flowers in New York New York
AOI only New York flowers  
California flowers in New York New York
LOP and AOI New York flowers  
California flowers in New York New York

You can get or set LOP and AOI based geo-targeting through the settings field of your campaign using the GeoTargetTypeSetting class. The following C# code snippet shows how to set AOI based geo-targeting for your campaign.

long campaignId = long.Parse(_T("INSERT_CAMPAIGN_ID_HERE"));

// Create campaign with updated budget.
Campaign campaign = new Campaign();
campaign.id = campaignId;

// Set GeoTargetType.
GeoTargetTypeSetting geoSetting = new GeoTargetTypeSetting();
geoSetting.positiveGeoTargetType =
GeoTargetTypeSettingPositiveGeoTargetType.AREA_OF_INTEREST;
campaign.settings = new Setting[] {geoSetting};

// Create operation.
CampaignOperation operation = new CampaignOperation();
operation.@operator = Operator.SET;
operation.operand = campaign;

// Update campaign.
CampaignReturnValue retVal = campaignService.mutate((new CampaignOperation[] {operation}));


GeoTargetTypeSetting can also be used to geo-target negatively. You can do negative geo-targeting based on LOP alone, or both LOP and AOI. To understand how negative GeoTargetTypeSetting works, consider the following modified version of the previous example:

You run a campaign that targets all of the US, but excludes New York, and one of your keywords is “flowers”. The following table shows how Google serves ads based on your settings.

Target Method User Location (LOP) User Query User’s Area of Interest (AOI) User sees Ad
LOP only New York flowers  
California flowers in New York New York
Texas flowers  
LOP and AOI New York flowers  
California flowers in New York New York
Texas flowers  

The following code snippet shows how to apply negative GeoTargetTypeSetting based on LOP:

// Set GeoTargetType.
GeoTargetTypeSetting geoSetting = new GeoTargetTypeSetting();
geoSetting.negativeGeoTargetType =
GeoTargetTypeSettingNegativeGeoTargetType.LOCATION_OF_PRESENCE;
campaign.settings = new Setting[] {geoSetting};


A few points worth noting about GeoTargetTypeSetting:

  • This setting applies only to ads targeting the Google Search Network, and does not affect ads targeting the Google Display Network.
  • This setting applies only within a country where we determine the user is physically located based on their device location (such as an IP address). For example, if you have targeted New York for your ads, then the ad would not show for a user in London searching for flowers in New York.
  • Even if you have a negative LOP based targeting for a certain area, your campaign's geographic reports may still show impressions from your excluded area. This is because we report a physical location for users whose search didn't include a location of interest, and we generally report the user's location of search intent if their search includes one.

We have added support for LOP and AOI based geotargetting in all of our client libraries, so please take advantage of this new feature and share your feedback with us on the forum.

  --Anash P. Oommen, AdWords API Team

Discover v2009: Location Extensions

Wednesday, December 23, 2009


Location, location, location: so goes the mantra of the real estate business. Although, in this constantly connected world where people are carrying Internet-enabled mobile devices more and more, location is important to every retail business. Often, users are looking for the closest provider of a service or a product, rather than your specific business.

So how can you get your business on the map? In the past, we had an entirely separate ad type: the Local Business Ad (LBA). But with the new AdWords interface and AdWords API v2009, we have a much simpler solution available: Location Extensions. These allow you to easily add location information to any text ad in your campaigns.

Let's look at an example. Say your business has a few branches open throughout the city, and you want to add location information to your existing ads. The first step is to retrieve the location of each branch, based on its address. That means making a call to the new GeoLocationService, which uses a process known as "geocoding."

// Create address object.
Address address = new Address();
address.setStreetAddress("123 Easy Street");
address.setCityName("Mountain View");
address.setProvinceCode("US-CA");
address.setPostalCode("94043");
address.setCountryCode("US");
// Get location information from the service.
GeoLocationSelector selector = new GeoLocationSelector();
selector.setAddresses(new Address[] {address});
GeoLocation[] locations = geoLocationService.get(selector);
location = locations[0];

The next step is to use the CampaignAdExtensionService to add a location extension to your campaign using the information returned by the GeoLocationService:

// Create LocationExtension.
LocationExtension locationExtension = new LocationExtension();
locationExtension.setAddress(location.getAddress());
locationExtension.setGeoPoint(location.getGeoPoint());
locationExtension.setEncodedLocation(location.getEncodedLocation());
locationExtension.setCompanyName("Foo");
locationExtension.setPhoneNumber("650-555-5555");
locationExtension.setSource(LocationExtensionSource.ADWORDS_FRONTEND);
// Create CampaignAdExtension.
CampaignAdExtension campaignAdExtension = new CampaignAdExtension();
campaignAdExtension.setCampaignId(campaignId);
campaignAdExtension.setAdExtension(locationExtension);
// Add location extension to the campaign.
CampaignAdExtensionOperation operation = new CampaignAdExtensionOperation();
operation.setOperand(campaignAdExtension);
operation.setOperator(Operator.ADD);
CampaignAdExtensionOperation[] operations =
new CampaignAdExtensionOperation[] {operation};
CampaignAdExtensionReturnValue result =
campaignAdExtensionService.mutate(operations);

Multiple location extensions can be added to the same campaign, and by default each ad in the campaign will be associated with every location. When serving your ad the AdWords system will choose the most relevant location to display to the user. Do keep in mind that there is a limit of 9 manually created location extensions per campaign. Alternatively you can have AdWords pull addresses directly from your Local Business Center (LBC) account, which isn't subject to the same restriction. For now, LBC synchronization is only supported via the AdWords interface, but the next API version will include support for it as well.

Of course, not all ads are created equal, and you may want some ads to target only a single store. In that case, the solution is to create an Ad Extension Override for the one location extension that you do want to associate with that ad:

// Create ad extension override for the specified ad Id.
AdExtensionOverride adExtensionOverride = new AdExtensionOverride();
adExtensionOverride.setAdId(adId);
// Create ad extension object using specified campaign ad extension Id.
// This will be the only extension used for the specified ad.
AdExtension adExtension = new AdExtension();
adExtension.setId(campaignAdExtensionId);
adExtensionOverride.setAdExtension(adExtension);
// Add the override.
AdExtensionOverrideOperation operation = new AdExtensionOverrideOperation();
operation.setOperand(adExtensionOverride);
operation.setOperator(Operator.ADD);
AdExtensionOverrideOperation[] operations =
new AdExtensionOverrideOperation[] {operation};
AdExtensionOverrideReturnValue result =
adExtensionOverrideService.mutate(operations);

If you're looking for more detailed examples, be sure to check the 'examples' directory for the client library of your choice.

Extending your ads with location information will enable them to be shown on Google.com and other properties (such as Google Maps), bringing you closer to your customers' local searches. That way they'll not only find out about your offers, they'll actually be able to find you.

-- Sérgio Gomes, AdWords API Team