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
I used:
window.onload = function() {
(adsbygoogle = window.adsbygoogle || []).push({});
}
My site was loading pages in a special way, making heavy use of AJAX, so it had to be this way. Hope this helps someone.
EDIT 2018: I feel like I should mention now that the preferred way to do this would be with window.addEventListener( 'load', ... )
, instead of the old method of window.onload = ...