Skip to content

Conversation

@jbmolle
Copy link

@jbmolle jbmolle commented Mar 7, 2024

It seems that Adsense script automatically insert an invisible ins element at the bottom of the page

<ins class="adsbygoogle adsbygoogle-noablate" style="display: none !important;" data-adsbygoogle-status="done" data-ad-status="unfilled"><div id="aswift_0_host" style="border: medium; height: 0px; width: 0px; margin: 0px; padding: 0px; position: relative; visibility: visible; background-color: transparent; display: inline-block;" tabindex="0" title="Advertisement" aria-label="Advertisement"><iframe ...></iframe></div></ins>

So if we don't put any ads component on a page, the current onload script will find this ins (with className 'adsbygoogle') and try to call adsbygoogle.push with raises the error "All ins elements in the DOM with class=adsbygoogle already have ads in them."
I think this pull request fixes #156 and maybe #179
Also it works only when onPageLoad option is set to true.

@TheAlexLichter TheAlexLichter self-requested a review September 7, 2024 17:18
@valere-hope
Copy link

valere-hope commented Oct 3, 2024

Please approve this change. I don't understand why is still pending. It's pretty urgent. This google-adsense module is completely obsolete right now. Close this project if you don't update it.

@TheAlexLichter
Copy link
Collaborator

@valere-hope Nobody stops you from patching this change until it is merged. I will do so as soon as I have time for it to revisit the PR.

@valere-hope
Copy link

Ok, thank you. Sorry for my harshness but I lost a lot of time trying to solve issues with this module. It is promoted on nuxt3 official website but it is outdated. I also understand the fact that you have little time available since 7 months have passed since the request. So i'll try to find another solution. Thank you.

@TheAlexLichter
Copy link
Collaborator

Ok, thank you. Sorry for my harshness but I lost a lot of time trying to solve issues with this module. It is promoted on nuxt3 official website but it is outdated. I also understand the fact that you have little time available since 7 months have passed since the request. So i'll try to find another solution. Thank you.

I'll get it done by the end of the week 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

"adsbygoogle.push() error: All ins elements in the DOM with class=adsbygoogle already have ads in them."

4 participants