Detect ad blocker browser extensions and display a full-page modal overlay prompting visitors to disable them before continuing to browse your site.

Dual Detection

Uses both DOM-based cosmetic filter detection and network-level request blocking detection for high accuracy.

Configurable Behavior

Control detection delay, whether users can dismiss the overlay, and customize the displayed text per language.

Auto-Injection

Global middleware automatically injects the detector into all front-end pages: no template changes needed.

Theme Override

Themes can provide their own detector overlay design by overriding the default view.

Use Cases

Ad-Supported Content Site

Your site relies on advertising revenue. When a visitor has an ad blocker enabled, the overlay appears and prompts them to disable it. You can block all access until they comply or allow them to dismiss the overlay and continue.

Freemium Model with Ads

Free users see ads, premium users do not. Use the detector to enforce the ad-viewing experience for anonymous visitors, while registered members are not affected (enable Skip Logged-In Users).

Publisher Compliance

Ad networks require a minimum number of ad impressions. The detector helps ensure your ad slots are actually rendered and visible to visitors.

Requirements

  • LaraClassifier / JobClass v19.0.0 or later
  • PHP 8.3+
  • No external dependencies: the add-on is fully self-contained
Note: This add-on does not require any database tables. All settings are stored in the core settings table.

Installation

Step 1: Upload the add-on

Go to Admin panel → Extensions → Add-ons, click Upload add-on and drop the add-on's .zip file into the upload area (50 MB maximum). The archive is extracted into extensions/addons/adsblockerdetector/ and Ad Blocker Detector appears in the list, deactivated.

Cannot upload from the browser? Unzip the archive on your computer and copy the add-on folder to extensions/addons/adsblockerdetector/ over FTP or SSH: its addon.json file must sit directly inside that folder. Then open Admin panel → Extensions → Add-ons. The page scans extensions/addons/ every time it loads, so the add-on is listed straight away (the Sync button runs the same scan on demand).

Step 2: Activate the add-on

Click Activate on the Ad Blocker Detector card. It is a paid add-on, so a dialog asks for its purchase code, which is verified before anything else happens: an invalid code is rejected in the dialog and nothing is changed.

Once the code is accepted, activation runs in one pass: it creates the add-on's database tables (its migrations), registers its permissions, runs its seeders and publishes its public assets. Reload the page to see its new entry in the Add-ons section of the admin sidebar.

Step 3: Configure

Open Admin panel → Ad Blocker Detector from the Add-ons section of the sidebar and set the add-on up: see Admin: Settings.

Purchase Code (License Key)

Ad Blocker Detector is sold as a separate product, so it has its own purchase code (license key), distinct from the purchase code of the main application and from the one of every other add-on. You are asked for it when you activate Ad Blocker Detector in Admin panel → Extensions → Add-ons.

Our products are sold on three platforms. The way you receive a purchase code depends on where you bought the product.

Platform / Marketplace How you get the purchase code Where to find it again
bedigit.com Store
In-site purchase (Shop)
Generated automatically when the order is paid, then sent by email, either in its own license email, or inside the order confirmation email. My Account → My Licenses on bedigit.com
Gumroad Created as soon as Gumroad notifies us of the sale, then sent in a separate email, in addition to the Gumroad receipt. The license email, your Gumroad Library, and My Account → My Licenses on bedigit.com
Envato Market
CodeCanyon
Issued by Envato, not by us, and never sent by email: you download it yourself from your Envato account. Envato account → Downloads → License certificate & purchase code
Check your spam folder. For both bedigit.com Store and Gumroad purchases, the purchase code is delivered by email. Automated license emails are very often filtered, so if the message is not in your inbox, look in your spam / junk folder before contacting support, and add our sender address to your contacts or allow list.

1. bedigit.com Store (in-site purchase)

  • As soon as the order’s payment status becomes Paid, a license key is generated automatically for every licensed item in the order (one key per purchased unit: buying 3 units gives 3 distinct keys).
  • It is emailed to the address used on the order, either in a dedicated license email or inside the order confirmation email. Check your inbox and your spam / junk folder.
  • The key stays available in your account under My Account → My Licenses. Keys are masked in the list; open the license detail page to reveal and copy the full key, see the domains it is activated on, and deactivate a domain to free an activation slot.
  • The matching invoice is under My Account → My Orders.

2. Gumroad

  • A Gumroad purchase produces two separate emails: the Gumroad receipt (sent by Gumroad, giving access to the files) and a license key email (sent by bedigit.com) that contains your purchase code.
  • The license key email is generated as soon as Gumroad notifies us of the sale, so it normally arrives within seconds of the payment. Here too, check your inbox and your spam / junk folder.
  • When the Gumroad product uses Gumroad’s own license-key feature, the same key also appears in your Gumroad receipt and under Library → your purchase on gumroad.com.
  • Use the same email address on bedigit.com as on Gumroad: your keys are then linked to your account automatically and listed under My Account → My Licenses, even if you register after the purchase. You can also add a Gumroad key manually from My Account → My Gumroad Licenses.

3. Envato Market (CodeCanyon)

  • Envato purchase codes are issued and delivered by Envato Market, never emailed by us, so there is nothing to look for in your spam folder: you retrieve the code from your Envato account.
  • Log in to your Envato / CodeCanyon account, open the Downloads page, find the item, and choose License certificate & purchase code from the Download dropdown. The code is written in that certificate.
  • An Envato purchase code looks like 12345678-90ab-cdef-1234-567890abcdef (8-4-4-4-12 characters). It never changes, and renewing item support does not issue a new one.
  • Official Envato article: Where Is My Purchase Code?
Lost your purchase code? Search your mailbox (spam folder included) for “license” or “purchase code”, then check My Account → My Licenses on bedigit.com for Store and Gumroad purchases, or Downloads → License certificate on Envato. If it is still missing, open a ticket on our Help Center with your order number (Store), Gumroad sale ID or buyer email (Gumroad), or Envato username and item name (Envato).

Configuration

All settings are managed from the admin panel, in the Add-ons section of the sidebar: Admin panel → Add-ons → Ad Blocker Detector. They are stored in the core settings table (group adsblockerdetector).

Setting Description Default
adsblockerdetector_enabled Enable or disable ad blocker detection globally true
adsblockerdetector_detection_delay Delay in milliseconds before checking for ad blockers (100–5000) 300
adsblockerdetector_allow_dismiss Whether users can close the overlay without disabling their ad blocker false
adsblockerdetector_skip_bots Never show the overlay to known search engines, crawlers and AI agents (and to requests with an empty User-Agent), so pages stay indexable true
adsblockerdetector_skip_logged_in Never show the overlay to logged-in users (this already covers admin users) false
adsblockerdetector_skip_admins Never show the overlay to admin users (users with the admin flag or the admin role). Ignored when adsblockerdetector_skip_logged_in is enabled. false
adsblockerdetector_title Custom overlay title per language. Leave empty to use the default translation. empty
adsblockerdetector_message Custom overlay message per language. Leave empty to use the default translation. empty

Default values come from the add-on’s config file (extensions/addons/adsblockerdetector/config/adsblockerdetector.php). Values saved from the settings page override these defaults.

The detector is never injected into admin panel pages, installer/upgrade pages, AJAX/JSON responses, or responses without a closing </body> tag.

Admin: Settings

The settings page is available at Admin panel → Add-ons → Ad Blocker Detector. Viewing it requires the admin.setting.view permission and saving it requires admin.setting.edit. The page has two tabs.

General Settings

  • Enable Ad Blocker Detection: Toggle the detector on or off globally.
  • Detection Delay (ms): How long to wait before running detection (100–5000ms). Higher values reduce false positives but delay the overlay appearance.
  • Allow Dismiss: When enabled, a “Continue anyway” button appears on the overlay, letting users bypass it without disabling their ad blocker. Dismissing only closes the overlay for the current page view: it is shown again on the next page if the ad blocker is still active.
  • Skip Bots & Crawlers (on by default): Known search engines, crawlers and AI agents never receive the overlay, so your pages stay indexable.
  • Skip Logged-In Users: The overlay is never shown to authenticated users. This already covers admin users.
  • Skip Admin Users: The overlay is never shown to users with the admin flag or the admin role. This option is hidden while Skip Logged-In Users is enabled, since that option already covers admins.

Custom Text

You can set a Custom Title and a Custom Message for the overlay, per language. A language selector lets you enter text for each language of your site. Leave the fields empty to use the default translations from the add-on’s language files.

Routes

Method URL Name Permission
GET /admin/adsblockerdetector/settings admin.adsblockerdetector.settings.index admin.setting.view
PUT /admin/adsblockerdetector/settings admin.adsblockerdetector.settings.update admin.setting.edit

The /admin prefix follows your admin panel base path.

Overlay UI

When an ad blocker is detected, a full-page modal overlay appears with:

  • A semi-transparent dark backdrop covering the entire viewport (z-index 99999).
  • A centered white dialog box with a shield icon.
  • A configurable title (default: “Ad Blocker Detected”).
  • A configurable message explaining why ad blockers should be disabled.
  • Step-by-step instructions for disabling the ad blocker.
  • A primary “I’ve Disabled It” button that rechecks detection.
  • An optional “Continue anyway” dismiss button (if allow_dismiss is enabled).

The overlay locks page scrolling by adding a .abd-locked class to <body>. All styling is inline (no external CSS requests) and the overlay is fully responsive.

Accessibility

  • role="dialog" on the overlay element
  • aria-labelledby="abdTitle" linking to the title
  • aria-modal="true" for screen readers
  • aria-hidden="true" on bait elements
  • Color contrast meets WCAG AA standards

Updating

An update only replaces the add-on's files. Its database tables and data, its settings, its activation state and its recorded purchase code are all kept, so do not deactivate or remove the add-on before updating it. Back up your database first all the same.

Method 1: Upload the new version (recommended)

  1. Download the latest .zip file of the add-on.
  2. Go to Admin panel → Extensions → Add-ons and click Upload add-on.
  3. Drop the .zip file into the upload area.
  4. Because Ad Blocker Detector is already installed, a prompt shows the installed version and the new one. Click Replace: the extensions/addons/adsblockerdetector/ folder is swapped for the new files. Cancelling the prompt discards the upload.

Method 2: Replace the files by hand

  1. Over FTP or SSH, delete the extensions/addons/adsblockerdetector/ folder and upload the new one in its place. Replace the whole folder rather than copying over it, so files dropped by the new version do not linger.
  2. Open Admin panel → Extensions → Add-ons: the page re-reads addon.json and the card shows the new version number.

After the files are replaced

If your installation caches its configuration or routes (php artisan config:cache, route:cache), run php artisan optimize:clear after the update.

Uninstallation

Switching an add-on off without losing anything is a deactivation: go to Admin panel → Extensions → Add-ons, click Deactivate on the Ad Blocker Detector card and confirm.

  • The add-on is no longer loaded: its routes, views, admin sidebar entry and front-end pages stop answering.
  • Its database tables and all the data they hold are kept, and its files stay under extensions/addons/adsblockerdetector/. Nothing is deleted.
  • Its permissions and its recorded purchase code stay in the database. Only Remove deletes them.
  • Deactivation is refused while another active add-on depends on this one: deactivate that add-on first.

Click Activate on the same card to switch it back on. As for a first activation, the purchase code is asked for and verified again; then any pending migrations run, the assets are republished, and the add-on picks up exactly where it left off.

Removing

Removing is permanent and destroys the add-on's data. The Remove button only appears on a deactivated add-on, so removal is always two steps:

  1. Deactivate Ad Blocker Detector (see Uninstallation).
  2. Click Remove on its card and confirm the prompt.

The admin panel then, in one pass:

  • runs the add-on's uninstall hook, if it ships one, while its code is still on disk;
  • revokes the permissions declared in its addon.json;
  • rolls back its migrations (this drops its database tables and every row they hold) and purges its entries from the migrations table, so a later reinstall migrates from scratch;
  • deletes its published assets: public/addons/adsblockerdetector/, public/vendor/adsblockerdetector/ and storage/app/public/addons/adsblockerdetector/;
  • deletes the add-on directory extensions/addons/adsblockerdetector/;
  • deletes its row in the addons table (the recorded purchase code goes with it) and clears the application cache.
This cannot be undone. Back up your database before removing an add-on whose data you may still need: installing it again later creates empty tables, not your old content, and asks for the purchase code again.

Removal is refused, with an explanatory message and before anything is destroyed, when the add-on is still active, when another active add-on depends on it, or when the web server (PHP) user cannot delete extensions/addons/adsblockerdetector/. In that last case, give that user write permission on the directory and on its parent, then try again.

Deleting the folder over FTP or SSH is not equivalent: the add-on is only switched off, and its tables, its entries in the migrations table and its addons row are all left behind. Use Remove in the admin panel instead.

Troubleshooting

Overlay never appears

  • Verify the add-on is activated in Admin panel → Extensions → Add-ons.
  • Check that Enable Ad Blocker Detection is switched on in the add-on settings.
  • If you are testing while logged in, check that Skip Logged-In Users (or Skip Admin Users for an admin account) is off, or test in a private window.
  • With Skip Bots & Crawlers on, browsers or testing tools that send a bot-like or empty User-Agent never receive the overlay.
  • Make sure you are testing with an ad blocker installed and enabled.
  • Try reducing the detection_delay to 100ms for testing.
  • Check the browser console for JavaScript errors.

False positives (overlay appears without ad blocker)

  • Increase the detection_delay (try 1000ms or higher).
  • Check if your Content Security Policy (CSP) is blocking the fetch request to /ads/ad-banner.js.
  • Network-level blocking by corporate firewalls or DNS-level filters can trigger false positives.

Overlay appears on admin pages

  • This should not happen. The middleware excludes admin routes. If it does, check that isAdminPanelRoute() is correctly defined in the core helpers.

“I’ve Disabled It” button does not work

  • The ad blocker may still be active. The detector creates fresh bait elements on recheck.
  • Some ad blockers require a full page reload after disabling. The detector will reload the page once the recheck passes.

Was this article helpful?

Thank you for your feedback!

Still need help? Create a support ticket

Create a Ticket