javascript - 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>
解决方案
无需在所有 AdSense 单元中调用https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js 。只需在标题中使用一次。表示不要在所有单元中使用“”这个部分。
推荐阅读
- php - 在 PHP 中删除数组的数组
- centos7 - 无法在 centos 7 上将 php-imap 扩展安装到 php7.2
- python - 如何创建一个在python中运行代码的变量?
- c# - 返回列表的问题
来自 C# 中的方法和打印值 - elasticsearch - Kibana:无法恢复连接:http://elastic-url:9200/
- bash - 将 subshell 传递给 bash 函数
- wpf - 当绑定项目以外的其他内容发生更改时,如何重绘 ListViewItem?
- javascript - Javascript eval中的数组或对象?
- c - C中的多线程错误分段错误
- dynamics-crm - 全名控件在 Dynamics 365 Unified 界面中不起作用