Cherry Seed

Can I detect if a user has an ad blocker?

Quick Answer

Yes, using bait files (JavaScript named ads.js or elements with ad-related CSS classes). If the ad blocker removes the bait element, your detection script knows it is active. The IAB also provides open-source detection scripts.

Full Answer

Ad blocker detection methods: Script load check: Bait element: Known domain request: Problems with detection:

  • Blockers counter-detect detection scripts
  • False positives occur
  • Detection itself may be blocked
  • Cat-and-mouse game What to do with detection:
  • Show a message? (Users hate this)
  • Track it? (Ironic—tracking is blocked)
  • Alternative experience? (Complexity) Better approach: Instead of detecting and reacting, use tracking that doesn't get blocked. Server-side events happen regardless of client-side blockers. No detection needed.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/80

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/data-loss-adblockers/adblocker-impact-detect-ad-blocker