You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is especially noticeable with the JS and CSS files, but also happens to the plugin icon from the .org repo. I'm not sure what can be done about this in the plugin itself vs. having to ask various ad blocker lists to whitelist. One would think somebody managing an ads.txt file wouldn't want to be blocking ads on their own site but who knows, and it's a silent non-blocking error so it just makes the plugin look less awesome than it actually is. Any ideas/experience with this?
The text was updated successfully, but these errors were encountered:
We have this issue in Site Kit as well, when WordPress admins have an Ad blocker enabled and try to set up AdSense it usually fails because our REST API endpoint is blocked.
Thanks @adamsilverstein! I didn't quite trace it all the way, but am I reading right that it's related to canAdsRun?
An approach I had started thinking about was basically the way core does .no-js, having a message/notice in HTML that an ad blocker appears to be running that then gets hidden by the JS if it does manage to load. For this plugin that's probably a reasonably accurate lightweight route to take, just have to work on the messaging and what to tell users to do about it.
The approach you describe matching the way core works sounds good. It would be nice if implemented so that the notice was hidden until the page loaded, unhide if ads are blocked.
am I reading right that it's related to canAdsRun?
Yes exactly, the Site Kit code (which is admittedly obtuse) relies on an underlying mechanism where we load a file included in the plugin named "pagead2.js" which has a bit of code that sets a global canAdsRun. Ad blockers block that file from loading when active. Everything else relies on that global, and since our UI is mostly JS based we can respond accordingly.
This is especially noticeable with the JS and CSS files, but also happens to the plugin icon from the .org repo. I'm not sure what can be done about this in the plugin itself vs. having to ask various ad blocker lists to whitelist. One would think somebody managing an ads.txt file wouldn't want to be blocking ads on their own site but who knows, and it's a silent non-blocking error so it just makes the plugin look less awesome than it actually is. Any ideas/experience with this?
The text was updated successfully, but these errors were encountered: