Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adsense without Java Script

Hey I am thinking of adding Adsense to my website but the issue is that most of my users have non JavaScript phones.

The code I receive from Adsense is completely in 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>

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

like image 482
shahz Avatar asked Oct 18 '22 15:10

shahz


1 Answers

Nope, you can't do that:

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)

Well, mostly because it needed to request asynchrounously from their server to achieve some algorithm like your page view, ads click, security reason, etc. And it can't be achieved without javascript. So, you need another strategy for ads on your website, like selling a space for ads maybe? Hope it help, sorry for the bad english.

like image 106
Imam Assidiqqi Avatar answered Oct 21 '22 06:10

Imam Assidiqqi