Earn revenue from your mashup with the Maps Ad Unit
May 20th, 2009 | Published in Google Maps
Today we are excited to announce the Maps Ad Unit, a new feature that will enable geo developers to generate advertising revenue from their Google Maps API implementations.
The Maps Ad Unit joins the recently updated GoogleBar as part of the AdSense for Maps portfolio. This new opt-in Maps API feature overlays AdSense ads over an embedded Google map on your site. The ads are targeted to the map's view and update as the user moves around the map. To generate revenue after adding the Maps Ad Unit to your Maps API implementation, you need to link it to an AdSense account enabled with AdSense for Content.
To see the Maps Ad Unit in action, take a look at Acme Mapper and ZipMaps who have both added it to their Maps API implementations.
Adding the Maps Ad Unit to your site is easy. You simply need to create a GAdsManager
of style 'adunit'. You will also need to link this Maps Ad Unit to an AdSense account. If you don't yet have an AdSense account, sign up for an account. Once you have done so (or if you already have an account) make sure you've also enabled the account with AdSense for Content.
Once you have an AdSense for Content account, you will have received an AdSense for Content (AFC) publisher ID. Specify this publisher ID in the GAdsManager
constructor (see code snippets below). Optionally, you may also specify an AdSense for Content channel if you've set that up. (More information on advertising channels is located here.)
The snippet below creates a Maps Ad Unit with the given publisher ID and AdSense for Content channel. We assume that there is a map object that has already been created.
var publisher_id = "pub-1234123412341234"; // Replace 1234123412341234 with your Google AdSense publisher id. adsManagerOptions = { maxAdsOnMap : 2, style: 'adunit', channel: '12345678' // This field is optional - replace 12345678 with a channel number that you created for GooYAMLgle AdSense tracking }; adsManager = new GAdsManager(map, publisher_id, adsManagerOptions); adsManager.enable();
To alter the position of the Map Ad Unit, modify the GAdsManager's position property by specifying an alternative GControlPosition as shown below.
var publisher_id = "pub-1234123412341234"; // Replace 1234123412341234 with your Google AdSense client id. var adPos = new GControlPosition(G_ANCHOR_BOTTOM_RIGHT, new GSize(7, 20)); // Set the anchor position and GSize offset to your desired values. adsManagerOptions = { maxAdsOnMap : 2, style: 'adunit', channel: '12345678', // This field is optional - replace 12345678 with a channel number that you created for Google AdSense tracking position: adPos }; adsManager = new GAdsManager(map, publisher_id, adsManagerOptions); adsManager.enable();
If you want a smaller ad unit (for example, if you have a small map), you can get one by setting maxAdsOnMap to 1 in your adsManagerOptions.
We hope you consider implementing this new tool to generate revenue from your Google Maps API implementation! More information can be found within the Google Maps API docs and please be sure to provide feedback within the Maps API Google Group.