【问题标题】:Adsense in IFRAMEIFRAME 中的 Adsense
【发布时间】:2011-06-21 00:51:14
【问题描述】:

大家好, 我创建了一个完全基于 AJAX 的网络应用,但 Adsense 似乎无法为 AJAX 交付的内容生成任何相关广告。

为了展示相关的广告,我创建了一个 I-Frame,它会显示一个缓存文件,其中包含一个 html 格式的 AJAX 提取内容的硬拷贝,并在其中包含 adsense.js 脚本。

这是一个例子:

adsenseexample.html 


<html>
<head>
<title>User Cache</title>
</head>
<body>
<div style="height:200px;">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxxxxx";
google_ad_slot = "xxxxxxxxxxxxx";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
(This is where the cached content is. It's not visible to the user but 
a complete duplicate of what they are viewing. It's in
 plain text with no pictures for faster loading).
</head>
</body>

加载到 iframe 中:

<iframe src="adsenseexample.html"> </iframe>

任何人都知道为什么我仍然没有收到任何相关的广告。这种方法从一开始就有缺陷吗?

谢谢。

【问题讨论】:

  • 等等,广告正在显示,但它们似乎不相关?
  • 是的,就是这样。例如,我创建了一个测试帐户,其中包含由 AJAX 提供的有关计算机/技术的内容。就像我上面解释的那样,adense.html 将包含所有内容的纯文本版本并加载到 IFRAME 中。不幸的是,我收到的广告似乎是基于非 AJAX 交付的内容(如网站名称),而不是相关广告。

标签: ajax iframe adsense


【解决方案1】:

这是一个帖子中的一个有趣的讨论,似乎已经解决了这个问题。

Adsense in iframe ?

注意:我没有尝试过这个,虽然那个人说他这个解决方案是由谷歌提出的,但我会邮寄给他们,因为至少我不知道它是否违反了 TOS

【讨论】:

    【解决方案2】:

    嗯,您是否尝试过将参数传递给您的 iframe src,例如来自推荐 http 请求的关键字、描述?然后,您需要将关键字参数和描述添加到元标记。

    【讨论】:

      【解决方案3】:

      Google 在其服务条款中声明 IFRAMES 不得与 Adsense 一起使用。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-08-14
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多