|
关于移动端首屏广告加速显示脚本
在这段代脚本代码中更改为你个人的 Adsense 账户编号,要是显示 xxxx的话,那你所有收入归google所有了,或者不显示广告。此行Ads 仅在广告滚动开始时加载。手机完美加载。- <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-<b><font color="#ff0000">你个人的 Adsense 账户编号</font></b>"
- crossorigin="anonymous"></script>
复制代码- <script>
- window.addEventListener('load', function() {
- var is_adsense_load = 0
- window.addEventListener('scroll', function() {
- if (is_adsense_load == 0) {
- is_adsense_load = 1;
- var ele = document.createElement('script');
- ele.async = true;
- ele.src = 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'
- ele.setAttribute('crossorigin', 'anonymous')
- var sc = document.getElementsByTagName('script')[0]
- sc.parentNode.insertBefore(ele, sc);
- (adsbygoogle = window.adsbygoogle || []).push({
- google_ad_client: "ca-pub-xxxx",
- enable_page_level_ads: true
- });
- }
- })
- })
- </script>
复制代码- google_ad_client: "ca-pub-<b><font color="#ff0000">你个人的 Adsense 账户编号</font></b>",
复制代码 关于移动端广告不显示问题请截图私聊发截图,发截图时记得保护个人信息和域名隐私,建议私M!
|
评分
-
查看全部评分
|