Warn your (WordPress) website visitors if they don't block ads

This is an older project of mine that has gotten somewhat popular and I would love to make it better.

It’s a WordPress plugin (with instructions for non-WP sites available) that “detects” when your visitors are not blocking ads – but with the goal to warn them to install an ad-blocking extension.

And I say “detects”, the goal really is to simply create a “fake ad” that an adblocker will simply remove, so there’s not much of an actual detection happening.

Still, it turns out it’s actually not as easy as one might expect, with certain ad-blockers not considering the notification to be annoying enough.

Anyone interested in helping out?

3 Likes

nice, I did something similar but with plain js for a static site. The div and the script are both named something ad-related so get caught by basically every adblocker out there. (the script is literally called ad_display.js and the div it fills has the id AdsDiv LOL)

I don’t know how WordPress handles things though. If there’s a div container for your fake ad, id-ing it something ad-related like I did would probably let it be caught, without putting effort into making it actually annoying.

1 Like

Nice! Yes, I’m following the same idea, with the “note” that’s shown containing a bunch of classes typically used by ads.

And a JavaScript file with an ad-related name is also involved.

The WordPress part here really only handles adding this element to the page, and loading the JS file.

1 Like