'Google Ad's error (adsbygoogle = window.adsbygoogle || []).push({});

I've placed the ads on the WordPress site it's working fine at the time but after a while the google ads didn't display Before:

<!-- wp:html -->
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-9310298206025962"
     crossorigin="anonymous">
     
     </script>
<!-- Display Ad Unit 1 -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-9310298206025962"
     data-ad-slot="9808339852"
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>
<!-- /wp:html -->

<!-- /wp:html -->
<amp-ad width="100vw" height="320"
     type="adsense"
     data-ad-client="ca-pub-9310298206025962"
     data-ad-slot="9808339852"
     data-auto-format="rspv"
     data-full-width="">
  <div overflow=""></div>
</amp-ad>
<!-- /wp:html -->

After a while above code turns into this:

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


Solution 1:[1]

If you have placed the above code in the HTML through WordPress default plugin/HTML method then just remove it. Use some plugins called (Ad Inserter or Advance Ads) and then this error will be removed.

Method/Solution 2: If you are using some theme builders like Elementor etc just uses their own HTML code source to put your Adsense code.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shan Iqbal