Google Adsense Error “TagError: adsbygoogle.push() error: No slot size for availableWidth=0 ”

后端 未结 13 1399
梦如初夏
梦如初夏 2021-01-31 08:56

I\'m using responsive Google Ads on my website but unfortunately it is not working all the time and most of time it is returning

TagError: adsbygoogle.pus

13条回答
  •  不思量自难忘°
    2021-01-31 09:42

    1. Make sure that the DOM is ready when pushing the ad.

    Vanilla (Modern browsers only)

    document.addEventListener("DOMContentLoaded", function() {
        (adsbygoogle = window.adsbygoogle || []).push({});
    });
    

    In jQuery

    $(document).ready(function(){
        (adsbygoogle = window.adsbygoogle || []).push({});
    });
    

    In Angular

    $timeout(function () {
        (adsbygoogle = window.adsbygoogle || []).push({});
    });
    

    2. Make sure the number of ads you have on the page is correct.

    • Total number of ads does not exceed google's limit, which is 3 ads per page. Advertising and other paid promotional material added to your pages should not exceed your content, per Google's new policy.
    • Number of ads pushed to adsbygoogle corresponds to the number of ads you have on page.

    3. For responsive units, add width and height.

    Responsive ad units need a width and a height specified on the ins element. You could do something like this:

    ins {
        min-width: 300px;
        min-height: 50px;
    }
    

提交回复
热议问题