Javascript errors from Google Adsense

后端 未结 9 2284
无人共我
无人共我 2020-11-30 22:44

On several of my adsense running sites, I have been getting the following errors:

Unable to post message to [http://]googleads.g.doubleclick.n

9条回答
  •  感情败类
    2020-11-30 23:23

    This seems to be a case of the error message masking the real cause. The real cause is probably some kind of Adsense misconfiguration; unfortunately Adsense doesn't seem to do sufficient checks to give a more relevant error message.

    I had this error myself and came to this conclusion after researching the forums, where some people reported it was fixed after verifying their bank account or whatever. In my case, my server-side environment was messing with the google_ad_client parameter, so the real problem was that parameter being null. Once I fixed that, ads were showing and no more error message.

    So in practice, it's really nothing to do with same-origin policy. Now that the adsense code is correct, I'm even now able to show ads when running on localhost, as well as on the server.

提交回复
热议问题