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

后端 未结 13 1410
梦如初夏
梦如初夏 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:38

    You need to remove the others that are not visible, how I use (jQuery):

    $(document).ready(function(){
      var $analyticsOff = $('.adsbygoogle:hidden');
      var $analyticsOn = $('.adsbygoogle:visible');
    
      $analyticsOff.each(function() {
        $(this).remove();
      });
      $analyticsOn.each(function() {
        (adsbygoogle = window.adsbygoogle || []).push({});
      });
    });
    

提交回复
热议问题