Solution for Google AdSense ads not showing

Are you seeing a blank white space taken by the script to show the ads but there is no google ad visible in that slot?

Is your google developer console showing the following error:

J {message: ‘adsbygoogle.push() error: No slot size for availableWidth=0’, name: ‘TagError’, pbr: true, stack: ‘TagError: adsbygoogle.push() error: No slot size f…google.js?client=ca-pub-CLIENTID)’}

The above can be fixed easily by adjusting ins code for your google adsense snippet.

The code will look something similar to the following:

<script async="" src="" crossorigin="anonymous"></script><br /> <!-- headbar --><br /> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-CLIENTID" data-ad-slot="SLOTID" data-ad-format="auto" data-full-width-responsive="true"></ins><br /> <script><br /> (adsbygoogle = window.adsbygoogle || []).push({});<br /> </script>

The error occurs because google is unable to determine the width of the page. So to resolve the issue, all you have to do is add the following css style into the ins style block to fix the issue: width:100%;

After adding the style your code will look similar to the following ins class=”adsbygoogle”
and the ad will show start displaying on your website.

Leave a Reply