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
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.
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;
}