Adsense的使用AJAX [英] Adsense with AJAX

查看:204
本文介绍了Adsense的使用AJAX的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读<一href="http://stackoverflow.com/questions/6161806/desperately-need-a-solution-for-adsense-that-works-with-ajax">this, <一href="http://stackoverflow.com/questions/435391/refresh-a-div-that-has-a-google-ad-inside-it#441425">this和<一href="http://stackoverflow.com/questions/6394594/how-to-force-advert-to-show-on-ajax-loaded-page-adsense">this,但我觉得我的情况不一样。 我不需要刷新广告每次我做一个AJAX调用。

I read this, this and this, but I think my situation is different. I don't need to refresh Ads everytime I make an AJAX call.

我有一个页面称之为mypage.php。我打开的Adsense广告到第一个div,当打开页面。我的第二个div是空的。

I have a page call it "mypage.php". I load Adsense advertisement into first div, when page is opened. My second div is empty.

在DOM完全加载,我做一个AJAX职位。并把结果变成lower_content分区。 这是否打破Adsense的服务条款?

After DOM is fully loaded, i make an AJAX post. And put the result into "lower_content" div. Does this break Adsense TOS?

<body>
  <div id="adSense_content>
    <script> adsense script </script>
  </div>

  <div id="lower_content">
    empty in start
  </div>
</body>

我的js文件:

My js file:

$(document).ready(function() {
  $.ajax({
    type: "POST",
    url: "/getit",
    success: function(data) {
            $("#lower_content").html(data);
        }
  });
}

注:我为什么不加载第二个内容时,页面被打开?因为AJAX调用回答6-7秒。当服务器负载高,响应来自即便是在10-15秒。为了不使游客等待与空白页,或者甚至从页面反弹。我告诉布局前往参观开始,并加载内容时AJAX调用的响应来了。

Note: Why I don't load second content when page is opening? Because AJAX call replies in 6-7 seconds. When server load is high, response comes even in 10-15 seconds. To not to make visitor wait with empty page, or even bounce from the page. I show layout to visitor in start, and load content when the response of AJAX call came.

编辑:把一个广告到一个空白页反对票Adsense的服务条款。但是,我所提到的页面是空的,而加载表数据。使用AJAX加载全表后,页面加载与内容。但是,在加载HTML网页的广告被置于。

edit: Putting an ad to an empty page is againts Adsense TOS. But the page that I mentioned is empty while loading the table data. After loading the full table with AJAX the page is loaded with content. But ad is put while loading the html page.

推荐答案

做了一些更多的研究..有没有简单的解决您的问题。

Did some more research .. there is no easy solution to your problem.

如果您的站点使用AJAX的大部分内容,那么你可以看看实现谷歌的Ajax爬行(又名散邦)规格。这将确保该谷歌机器人和AdSense漫游抓取您的Ajax内容。这将有助于与两个相关的广告和搜索结果。 https://developers.google.com/webmasters/ajax-crawling/docs/specification

If your site uses AJAX for a majority of the content then you can look at implementing the Google Ajax-Crawling (aka Hash-Bang) specs. This will ensure that that the Google bot and Adsense bot crawl your AJAX content. This will help with both relevant ads and search results. https://developers.google.com/webmasters/ajax-crawling/docs/specification

或者你必须等到Adsense的为Ajax程序重新开始。 https://developers.google.com/adsense-for-ajax/

Or you have to wait till the Adsense for Ajax program start again. https://developers.google.com/adsense-for-ajax/

更新:经过研究更改答案

这篇关于Adsense的使用AJAX的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆