我想添加2个AdSense代码到一个页面。当我这样做时,只显示一个(第一个定义的)并且该页面似乎处于无限载入状态。不能添加多个AdSense代码到一个页面
下面是带有示例插槽和客户端ID的代码。
<body>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxx";
google_ad_slot = 111111111;
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxx"; //the same like the first one client
google_ad_slot = 222222222;
google_ad_width = 336;
google_ad_height = 280;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</body>
如果我删除了这些adSense代码之一,而不是它的作用。我怎样才能使这两个代码工作?
你说得对,问题在于重写在两个横幅中使用的全局变量。我不太确定是否不需要两次show-ad.js。如果你看文件,你会发现一个匿名函数的调用。所以没有办法如何再次调用它。问题仍然存在。如何使它工作? – Frank
我已经搜索了一下,发现禁止在一个页面上拥有多个AdSense帐户。我会小心这个,因为这两个帐户都可以被禁止。 –
我的问题只有一个帐户。是的,你可以添加多个单位。 “每页最多可放置三个广告单元和三个链接单元”。请参阅https://www.google.com/adsense/policies – Frank