thestubborndev thestubborndev - 6 months ago 29
HTML Question

Adsense ads not appear

I have a website that runs on Apache2 and has code in PHP and JS + HTML.

Link to site: http://goldfaucet.xyz

This is the code of my ad unit:

I have an approved Adsense account that already was showing ads and getting revenue since months.

I created an Adsense ad unit and placed it on that website but it is not appearing.

If it can be useful, my account is not banned neither I use an adblocker.
Also ads work when tested in Adsense sandbox here: http://ctrlq.org/sandbox/

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 728x90_leaderboard -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-xxxxxx"
data-ad-slot="xxxxxx"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>


What can be the problem? There are no errors showing in debug console.

Thank you in advance.

Answer

remove async then try! like:

<script class="cc-onconsent-inline-advertising" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
    <ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-5288925454847888"
     data-ad-slot="4158176057"
     data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

You can also follow this link: 

http://www.labnol.org/internet/google-adsense-responsive-design/25252/

Comments