[GG广告相关]Google Adsense公益广告的替代方法(含文件下载)

1.首先在网站所在空间里建立一个文件夹,名字随便取,比如google。

2.下载google_adsense_script.htm文件,这是Google Adsense在没有合适的广告时,会调用的用户文件,我把代码贴出来:

Code:

1<html lang="en" xml:lang="en" xmlns="[url]http://www.w3.org/1999/xhtml[/url]"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> <title></title> <script src="[url]http://www.jgwy.net/google/top.js[/url]" type="text/javascript"></script> </head> <body style="background-color: transparent;"> </body> </html>

[Ctrl+A Select All]

3.调用的js文件,我命名为top.js:

Code:
document.write("

1<iframe align="center" border="0" frameborder="no" height="90" marginheight="0" marginwidth="0" scrolling="no" src="http://www.jgwy.net/google/hosting.htm" width="728"></iframe>

")
[Ctrl+A Select All]

这里我是用的iframe调用另一个htm文件(top_banner.htm),大家把它换成你自己的文件地址。
4.最关键的了,你自己的广告代码,写在top_banner.htm中:

Code:

1<html> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type"/> <title></title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } \--> </style> </head> <body> <script type="text/javascript"><!-- google_ad_client = "pub-6092161935511264"; google_alternate_ad_url = "[url]http://www.jgwy.net/google/google_adsense_script.htm[/url]"; google_ad_width = 468; google_ad_height = 60; google_ad_format = "468x60_as"; google_ad_channel =""; google_color_border = "6387C8"; google_color_bg = "F7F7F7"; google_color_link = "0000FF"; google_color_url = "008000"; google_color_text = "000000"; google_ad_type = "text"; //--></script> <script src="[url]http://pagead2.googlesyndication.com/pagead/show_ads.js[/url]" type="text/javascript"> </script> </body> </html>

[Ctrl+A Select All]

5.把以上三个文件修改好后,放到你建立的文件夹中。这里要注意的是,Google Adsense不能跨域调用,比如,你有两个域名,指向不同的空间,那么,这两个空间中就都得放上这三个文件,不同共同调用一处的文件。

6.登陆Google Adsense,在“替代广告网址或颜色“一栏中填上你的google_adsense_script.htm文件路径,保存然后更新你的
google广告代码,把新代码贴到你的网页中,其实也就是多了这么一行。

PS:经咨询GG官方,这种替换方法是官方允许的 :
http://www.jgwy.net/bbs/read.php?tid=100311

--------------------
您好!

非常感谢您发来电子邮件。

根据我们的检查,这样的展示广告的方式并没有违法我们的计划政策。不过,我们还是建议您将广告直接放入您需要展示广告的网页内,以取得最好的广告效果。

如果您还有任何其他问题或疑虑,请随时回复此电子邮件。

Google AdSense 小组敬上

Original Message Follows:
------------------------
From: "yamata" < [email protected] >
Subject: (SPAM: 10.28)
Date: Sun, 15 May 2005 16:08:28 +0800

Google AdSense,您好!

我是google adsense加盟网站站长,我在网上发现一段代码,请问这样的代码是否违规?代码请参看链接

http://www.jgwy.net/bbs/read.php?tid=99530&amp;fpage=1


礼!

yamata
[email protected]
2005-05-15
-------------

Published At
Categories with 站长专区
comments powered by Disqus