Adlens

Help · If your site runs ads

Visitors with ad blockers

How the script tells a pageview with an ad blocker from one without, whether or not the page shows ads.

What it shows #

The share of pageviews where an ad blocker was running. Those pageviews earn nothing from ads, so the share tells you how much of your traffic you are not paid for.

How it is measured #

On each page the script runs up to three checks. Any one of them is enough for the pageview to count as blocking ads:

  • It adds a hidden 1 by 1 pixel element with the class names ad blockers hide. If the element is hidden or removed 100 ms later, the pageview counts as blocking ads.
  • It asks for an empty file named prebid.js from the same place as the script, your own domain when you serve it first-party. Ad blocker filter lists refuse any script by that name, wherever it lives. If the script is refused but the same address answers a plain request, a blocker refused it. This catches uBlock Origin Lite on its default settings, which leaves the other two checks alone. Nothing is asked of another company.
  • On the first page of a visit only, it asks for Google's ad script, which blockers refuse. If the request fails, the pageview counts as blocking ads. Google is asked once per visit.

With or without ads #

The checks come from the script itself, not from your ads, so the share is measured whether or not the page shows ads. A site with no ads still sees how many of its visitors run a blocker.

It needs the first-party script #

A blocker that blocks the analytics script itself leaves nothing to count, and the share reads too low. Serve the script from your own domain: see First-party script.