Loads a file called banner_ads_300_250.js, a name routinely blocked by ad-blockers. If the file load is blocked it displays a red banner fixed on the bottom of the page requesting disabling the ad blocker. Website access is not restricted. Extremely light weight, just a few lines of code.
If you are using Google Analytics, here is code to track your website's ad blocking events to add to your Google Analytics tag. Place inside the <script></script> tags:
if(!document.getElementById('zjaIKtlLcRpd')){
gtag('event', 'blocking_ads', {
'event_label': 'Blocking Ads',
'event_category': 'blocking_ads',
'non_interaction': true
});}
- Upload the plugin to the
/wp-content/plugins/
directory
- Activate the plugin through the 'Plugins' menu in WordPress
Once you have completed these steps you're done. Now turn on your AdBlock and visit your site to test the plugin!