1

Some times I get this error in my console

Failed to load resource: the server responded with a status of 400 ()

And some times there is no error!!

I heard that it takes some time to show up the ads! But even in localhost I have to wait?

here is the code:

<!-- inside header -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"> 
</script>

<!-- at the place where I want to show -->
<ins class="adsbygoogle"
  style="display:inline-block;width:336px;height:280px"
  data-ad-client="ca-pub-XXXXXXXXXXXX"
  data-adtest="on"
  data-ad-slot="XXXXXX">
</ins>

<!-- inside scripts tag -->
<script>
    (adsbygoogle = window.adsbygoogle || []).push({});
</script>

enter image description here

my references: Is Google adsense available for localhost?

Ricardinho
  • 599
  • 9
  • 22
  • check this official reference https://support.google.com/admanager/answer/4599514?hl=en – Tamim Feb 17 '20 at 08:08
  • The status code of 400 in Google AdSense usually means there is something wrong with the ad code implementation. – STA Feb 17 '20 at 08:18

0 Answers0