Open kovaletsyurii opened 3 years ago
I have same problem, did you find a solution?
@kovaletsyurii @thor-n have you tired by using no-prefetch in nuxt-link ??
The reason this happens is exactly because the page is loaded using nuxt-link/router page load
This type of loading doesn't cause browser to reload, and hence the global variable window
which is used to store Google ads initialization is never cleared out.
Hence when you change page you might see in console errors saying something like slot already assigned or similar
The latest version for nuxt 3 seems to already have fixed this
https://github.com/nuxt-modules/google-adsense/blob/master/src/runtime/components-v3/Adsbygoogle.vue
By calling updateAd
the complete initialization is re-run causing ads to render
This issue can probably be closed
I have inserted an ad to the my page using this module and this ad works only with full page reload (for example when reload the page in browser or paste direct link on address field). When I open this page from my application (by clicking nuxt-link or after $route.push) ad wasn't load. my nuxt-config looks like:
and in my *.vue file: