Detect Adblock on Your Web Page, Save Your Users from Running Away

html

javascript

adblock-plus

adblock

Detect Adblock on Your Web Page, Save Your Users from Running Away

👨‍👨‍👧Plugins like AdBlock, Adblock Plus and many more are amazing tools to prevent from getting spammed.

BUT...

Has your Web App ever lost users because of that adblock which was installed on their browsers? Well, mine did, and if you're calling any API's from your front end (framework or simple JavaScript), there's a good chance that your users might face at least one of the following:

  • Not able to sign in from a custom OAuth (like Google, Facebook, Github)
  • Your own server API calls getting blocked and the user thinks that there's a bug on your page
  • 3rd party services' API calls getting blocked

All of this amounts to BAD USER EXPERIENCE. One more news is, you can't use JavaScript or anything to turn it off.

How I solved it was by detecting if there's an adblock enabled on my domain and showing the user a message to turn it off for a better experience. Well, that's the max I could do for now.

 

Let's take a look at the steps...!😛

Total 3 Steps!

Next

Discussion

Be the first one to comment!