通知

请务必访问您的 AdSense 页面,获取根据您的帐号为您量身定制的信息,进而利用 AdSense 取得出色的创收效果。

广告单元

如何为广告单元生成同步广告代码

您在 AdSense 帐号中生成的广告代码是完全异步的。它有助于改善网络延迟,为网站访问者提供更好的用户体验。如果您需要生成同步广告代码,例如您使用的是 Google Ad Manager 或其他不支持异步广告代码的广告服务器,则需要修改广告单元代码。

注意:您只能为固定尺寸的广告单元生成同步广告代码。

要修改现有广告单元代码,请进行以下代码更新:

异步广告单元代码

<script async src="https://pagead2.googlesyndication.com/
pagead/js/adsbygoogle.js"></script>
<!-- leaderboard -->
<ins class="adsbygoogle"
    style="display:inline-block;width:728px;height:90px"
    data-ad-client="ca-pub-xxxxxxxxxxxxxxxx"
    data-ad-slot="1234567890"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

同步广告单元代码

<script type="text/javascript">
    google_ad_client = "ca-pub-xxxxxxxxxxxxxxxx";
    google_ad_slot = "1234567890";
    google_ad_width = 728;
    google_ad_height = 90;
</script>
<!-- leaderboard -->
<script type="text/javascript"
src="https://pagead2.googlesyndication.com/
pagead/show_ads.js">
</script>
注意:我们不建议您在同一网页上混合使用异步和同步广告代码。

该内容对您有帮助吗?

您有什么改进建议?
true
您的 AdSense 页面

全新推出 AdSense 页面:在这项新资源里,您可找到为您量身提供的信息和发掘帐号中的新机会,从而帮助您利用 AdSense 取得出色的创收效果。

搜索
清除搜索内容
关闭搜索框
主菜单
18237134869088949217
true
搜索支持中心
true
true
true
true
true
157
false
false