没有 Java 脚本的 Adsense
Adsense without Java Script
嘿,我正在考虑将 Adsense 添加到我的网站,但问题是我的大多数用户都没有 JavaScript 手机。
我从 Adsense 收到的代码完全在 HTML & JavaScript :
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- home page ad -->
<ins class ="adsbygoogle"
style = "display : block"
data-ad-client = "ca-pub-XXXXXXXXXXXXX"
data-ad-slot = "XXXXXXXXX"
data-ad-format = "link">
</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
有没有办法让代码只在 HTML 中,以便我的所有用户都能看到广告?
不,你不能那样做:
To view Google ads on a website, you need to have JavaScript enabled
in your browser. (https://support.google.com/adsense/answer/12654?hl=en)
嗯,主要是因为它需要从他们的服务器异步请求以实现某些算法,例如您的页面视图、广告点击、安全原因等。没有 javascript 就无法实现。因此,您需要另一种策略来在您的网站上投放广告,例如销售 space 广告?希望对你有帮助,抱歉英语不好。
您可以使用 AdSense for Mobile 代码 - 如果您的帐户中有该选项。 (并非在每个国家/地区都可用。)
If your site supports mobile devices such as feature phones that
utilize WAP or i-mode, you'll need to use AdSense for mobile to
generate your ad code. Devices like feature phones can't render
JavaScript so you need to generate different ad code for them.
Similarly, if your mobile website supports both WAP/i-mode phones and
high-end devices, you'll need to use AdSense for mobile.
将广告代码添加到移动网页
https://support.google.com/adsense/answer/66871
嘿,我正在考虑将 Adsense 添加到我的网站,但问题是我的大多数用户都没有 JavaScript 手机。
我从 Adsense 收到的代码完全在 HTML & JavaScript :
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- home page ad -->
<ins class ="adsbygoogle"
style = "display : block"
data-ad-client = "ca-pub-XXXXXXXXXXXXX"
data-ad-slot = "XXXXXXXXX"
data-ad-format = "link">
</ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
有没有办法让代码只在 HTML 中,以便我的所有用户都能看到广告?
不,你不能那样做:
To view Google ads on a website, you need to have JavaScript enabled in your browser. (https://support.google.com/adsense/answer/12654?hl=en)
嗯,主要是因为它需要从他们的服务器异步请求以实现某些算法,例如您的页面视图、广告点击、安全原因等。没有 javascript 就无法实现。因此,您需要另一种策略来在您的网站上投放广告,例如销售 space 广告?希望对你有帮助,抱歉英语不好。
您可以使用 AdSense for Mobile 代码 - 如果您的帐户中有该选项。 (并非在每个国家/地区都可用。)
If your site supports mobile devices such as feature phones that utilize WAP or i-mode, you'll need to use AdSense for mobile to generate your ad code. Devices like feature phones can't render JavaScript so you need to generate different ad code for them. Similarly, if your mobile website supports both WAP/i-mode phones and high-end devices, you'll need to use AdSense for mobile.
将广告代码添加到移动网页
https://support.google.com/adsense/answer/66871