mazipan / vue-google-adsense

💰 Vue.js Google Adsense Component with InFeed and InArticle Ads support
https://mazipan.github.io/vue-google-adsense/
MIT License
257 stars 42 forks source link

fix: Non personalized ads TypeError #148

Closed schneefux closed 4 years ago

schneefux commented 4 years ago

a65b8f37c498279e43f0a0681905996b9325bf56 broke non personalized ads. (adsbygoogle = window.adsbygoogle || []).push({}).requestNonPersonalizedAds = 1; is not valid, because push() returns the length of the array (see MDN). This won't show any ads for NPA users or trigger TypeError: Cannot set property 'requestNonPersonalizedAds' of undefined for some users.

see also https://support.google.com/adsense/answer/9042142?hl=en

auto-comment[bot] commented 4 years ago

Thank you for raising your pull request. Please make sure you have followed @mazipan And please push ⭐ button in this repository

mazipan commented 4 years ago

Released 1.8.3

mazipan commented 4 years ago

@all-contributors please add @schneefux for code and bug

allcontributors[bot] commented 4 years ago

@mazipan

I've put up a pull request to add @schneefux! :tada: