N
Nuxt3mo ago
ciaddi

Problem with Nuxt3 and Google Adsense

Please Help me. I'm using Nuxt3 and it works incorrectly with Google Adsense, it duplicates the components on the page, and in some places the entire page, has anyone come across this? Disabling Google AdSense solves this problem but I need it. On google adsense i'm using the automatic ads option. This is the snippet (nuxt.config.ts). head: { script: [ { src: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', 'data-ad-client': 'ca-pub-################', async: true } ] }
1 Reply
Zeeeth
Zeeeth3mo ago
I think you should take a look at https://scripts.nuxt.com/ and the Adsense integration. Its not 100% tested according to the docs, but maybe it works for you?
Nuxt Scripts
Third-Party Scripts Meets Nuxt DX · Nuxt Scripts
Better performance, privacy, security and DX for third-party scripts.
Want results from more Discord servers?
Add your server