Get support for kieranja/AdBlockInsights

If you're new to LTH, please see our FAQ for more information on what it is we do.

Qualified Helpers
kieranja
owner From $50 / 30 mins

*This user needs to complete their payout settings before they can accept help requests


kieranja/AdBlockInsights

AdBlockInsights

This plugin will allow you to detect when an impression on your site is ad blocked. It's super simple to use and install.

You only need two files:

  1. AdBlockInsights.js
  2. advertisement.js

Just include AdBlockInsights.js into either your footer or header.

Then, after invoke:

AdBlockInsights.init(function() {
  alert("You have an ad blocker installed");
});

NOTE: AdBlockInsights.init MUST be invoked when the DOM is ready. If you're using jQuery you can use

$(function(){ 
  AdBlockInsights.init(function() {
    alert("You have an ad blocker installed");
  });
});

You can use Google Analytics events to track - as generally ad blockers are quite generous and allow GA calls through. However, for the most accurate results I recommend using some internal tracking software.

Our Mission

We want to make open source more sustainable. The entire platform was born from this and everything we do is in aid of this.

Interesting Articles

Thank you for checking out LiveTechHelper |
2025 © lth-dev incorporated

p-e622a1a2