首页 > 解决方案 > Google Adsense 错误 -adsbygoogle.push() 错误:每页仅支持一个 AdSense 头部标签。第二个标签被忽略

问题描述

我将脚本标签添加到导航栏组件。下次使用 js 构建时,我的网站上出现此错误:

Google Adsense error -adsbygoogle.push() error: Only one AdSense head tag supported per page. The second tag is ignored

         <Head>
        <script data-ad-client="ca-pub-********" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
        </Head>

标签: javascripthtmlnext.js

解决方案


无需在所有 AdSense 单元中调用https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js 。只需在标题中使用一次。表示不要在所有单元中使用“”这个部分。


推荐阅读