Javascript Vue如何将adsense脚本注入头部
我想包括在我的网站上的adsense,但我必须包括这个脚本的头部Javascript Vue如何将adsense脚本注入头部,javascript,vue.js,vuejs2,Javascript,Vue.js,Vuejs2,我想包括在我的网站上的adsense,但我必须包括这个脚本的头部 <script data-ad-client="ca-pub-XXXXXXXXXXX" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> 如何以编程方式将脚本注入头部 我可以将它添加到dist/的index.html中,但是我不会在git上跟
<script data-ad-client="ca-pub-XXXXXXXXXXX" async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
如何以编程方式将脚本注入头部
我可以将它添加到dist/
的index.html中,但是我不会在git上跟踪dist/
总有一天当我换电脑的时候,它会咬我的
如果使用默认的vue项目布局,通常会将其添加到
public/index.html
中https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js“添加后。但是谷歌证实他们找到了脚本…这正常吗?可能是你的adblocker/其他浏览器扩展阻止了请求?