0

I would like to make a button on my website which would prompt visitors to disable ad blockers.

Currently, I created a popup with two buttons, like generally seen in blogs to allow ads by disabling the ad blocker and one to not take any action i.e. to continue with the ad blocker enabled.

I am currently using Google Ads and the pop-up that I have made is this: enter image description here

The problem that I'm facing is how to implement this. There are many ad blockers out there, and I want to make a button in such a way that whenever a user clicks on the Whitelist button, it should initiate a popup from their respective ad blocker to whitelist my website.

0

1 Answer 1

1

You probably won't be able to solve this problem because it would require the web browser to have access to details about the user like which add-ons (aka extensions etc) the user has installed into their browser. And for your pop up to work as you want, where the user gets a prompt from their adblocker add-on, that add-on (and perhaps the add-on system in general) would have to implement an API that would connect all of this together, like the Web APIs that browsers already provide for websites to interact with.

Until we see a Web API for interacting with adblocking add-ons, you probably won't be able to do this.

A good alternative is probably to make your pop-up just act as a reminder to users that they may want to disable their adblocking add-on on your website. You could include details in the popup to explain why you want the user to do this. There might be technical restrictions (you're using AJAX for core functionality and it's interfering, etc) or you may just rely on ad revenue and so you want your users to help you keep your site up by viewing ads. The users can make every decision beyond that. Will they allowlist your site? Will they disable their add-on altogether? Will they choose to use your site without turning it off? etc

Try to post questions like this on Stack Overflow in the future, instead of this Stack Exchange site. Stack Overflow is the best site in the network for web development questions that are mostly related to programming (instead of running servers for a website, where this is probably best).

Best of luck!

Not the answer you're looking for? Browse other questions tagged .