Adsense without Java Script

Hey, I'm going to add Adsense to my site, but the problem is that most of my users have phones without JavaScript.

The code I get from Adsense is entirely in HTML and 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> 

Is there a way for the code to be in HTML just so that all my users can view the ad?

+5
source share
2 answers

You can use the AdSense mobile code - if you have this setting in your account. (It is not available in every country.)

If your site supports mobile devices, such as phones with features that use WAP or i-mode, you will need to use AdSense for Mobile to generate the ad code. Devices like telephones cannot JavaScript, so you need to create a different ad code for them. Similarly, if your mobile site supports both WAP / i-mode and high-end phones, you need to use AdSense for mobile.

Add ad code to mobile web page
https://support.google.com/adsense/answer/66871

+1
source

No, you cannot do this:

To view Google ads on a website, you need JavaScript enabled in your browser. ( https://support.google.com/adsense/answer/12654?hl=en )

Well, mainly because you had to request asynchronously from your server in order to achieve some algorithm, such as viewing your page, clicks on clicks, security reasons, etc. And this is not possible without javascript. So, do you need another strategy for advertising on your site, for example, to sell advertising space? Hope this helps, sorry for the bad english.

+2
source

Source: https://habr.com/ru/post/1242979/


All Articles