Google AdSense for maps map ads

Source: Internet
Author: User
Tags client

Map application is a popular network services, a lot of local information sites, such as tourism, housing leasing, catering information, such as the use of Google Maps API to achieve map services, then how these map-type sites through the map services to obtain revenue? Google AdSense for maps can be achieved through the display of map ads.

Google AdSense for maps there are two types of advertising display format, one is the search class ads, one is content-type ads, which is similar to Google's search alliances and content ads. Google describes the code settings for these two types of map ads in the Map API documentation.

  1, the Search type advertisement

This kind of advertisement is to display the advertisement in the search content result, need to use Googlebar function, first put your Publisher ID in the client content, then put the channel ID number in the channel, Here's a code to implement a map search ad through Googlebar, and when it's actually used, you're going to replace your Publisher ID with the client content in the code.

var map;
if (gbrowseriscompatible ()) {
var mapoptions = {
Googlebaroptions: {
Style: "New",
Adsoptions: {
Client: "Partner-google-maps-api",
Channel: "AdSense for Search channel",
Adsafe: "High",
Language: "EN"
}
}
}
Map = new GMap2 (document.getElementById ("Map_canvas"), mapoptions);
Map.setcenter (New Glatlng (33.956461,-118.396225), 13);
Map.setuitodefault ();
Map.enablegooglebar ();
}

Click here to see the details of the ads in the parameters meaning (English).

  2, Content category advertisement

Such ads on the map display a similar AdSense content class text ads, ads using the Gadsmanager structure, you want to add your Publisher ID and channel ID to Gadsmanager, you can display ads, At present, this type of advertising style seems unable to customize, the following is the content class map ads demo code.

var publisher_id = Yourpublisherid;
var adsmanageroptions = {
Maxadsonmap:2,
Style: "Adunit",
The Channel field is optional-replace this field with a channel number
For Google AdSense Tracking
Channel: "your_channel_id"
};
Adsmanager = new Gadsmanager (map, publisher_id, adsmanageroptions);
Adsmanager.enable ();

Click here to see the details of the ads in the parameters meaning (English).

The above picture is the actual display effect of the advertisement, the background color of the advertisement is light blue, cannot adjust, the advertisement size also cannot adjust, the feeling style is not particularly good-looking, the advertisement content seems to match with the geographical coordinates position, for example in the Shenzhen Shanghai Hotel coordinates, displays the clothing wholesale and the booking and so on advertisement. At present only text ads, not see multimedia ads.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.