3 ms·
Put a div tag with a class of "ad" on it... then test it's display style property 100ms after the load event... For that matter, wrap your primary content in a
by tracker1 11y ago
Put a div tag with a class of "ad" on it... then test it's display style property 100ms after the load event...
For that matter, wrap your primary content in a div with a class of "ad" ... then users won't even see the content, and you can replace it with a notice to disable adblock and refresh the page.
- eli 11y agoI tried that: https://github.com/elidickinson/ad-block-test https://github.com/elidickinson/ad-block-test Much harder to get right than you'd think and if you're a big site it's worse: the block lists will be updated to "whitelist" your test ad. It's difficult for publishers to even accurately measure what impact ad blocking is having on their business.
- tracker1 11y agoFunny, I had no problem detecting this on a site with several million unique visitors a month... Of course I did the detection against my actual ad tags in the page...
- eli 11y agoWouldn't you be getting false positives from ads that are simply slow to load and false negatives from ad blockers that hide ads without using the "display" property?