nextjs-google-adsense icon indicating copy to clipboard operation
nextjs-google-adsense copied to clipboard

Uncaught errors and empty page when loading additional content in JS with Ad Slots on the same page

Open red1 opened this issue 11 months ago • 0 comments

Hello I've integrated your module and it works fine until I tried to lazy load some blocks on my app, adding blocks with ResponsiveAdUnit loaded in ReactJS I've got the following errors : "Uncaught TagError: adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them." error image image I think it's due to the init of the library I've found this that is exactly the same : https://stackoverflow.com/questions/74577652/how-to-solve-uncaught-tagerror-adsbygoogle-push-error-all-ins-elements-in-t someone is suggesting but it did not worked for me in the main app js if (adsbygoogle && !adsbygoogle.loaded) (adsbygoogle = (window as any).adsbygoogle || []).push({});

red1 avatar Mar 09 '24 17:03 red1