Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Ad blockers breaking your site: how to find and fix it

PRF-113Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Ad blockers and privacy tools (uBlock Origin, AdBlock Plus, Brave Shields, Firefox Enhanced Tracking Protection, Safari Intelligent Tracking Prevention) block requests to known tracking and advertising domains. Many also block some chat, popup, A/B testing and consent tools, and some block by script file name or by page element names.

Blocking a script is normally harmless for the visitor. It becomes a bug on your site when your own code depends on the blocked script. Typical examples: a form's submit handler waits for a tracking callback, a button only works after a tag manager has loaded, a page is hidden by an A/B testing snippet until its script responds, or a checkout calls a global object such as fbq or dataLayer that does not exist.

Why it costs you leads or sales

The visitors who use blockers are often technical and high intent, and they simply cannot finish. They see a button that does nothing, a blank page or a form that never submits. Most will not tell you; they leave. You also see nothing in your analytics, because the same blocker hides them from the tools you would use to spot the drop.

How a blocked script ends a visit
  1. Page loadsVisitor has an ad blocker on
  2. Script blockedTag manager or pixel request is cancelled
  3. Submit handler failsCode waits for a missing object or callback
  4. No leadForm never sends

The blocker stops the script, the page code waits for it, and the lead is lost.

Form completions by visitor typeExample numbers
Form completions by visitor type (example)No blocker: 12 %; Blocker, script dependency: 0 %; Blocker, fixed: 11 %05912011No blockerBlocker, script depen…Blocker, fixed%

Example: illustrative numbers showing how a script dependency can wipe out completions for visitors with blockers.

How to check if your site has it

Test your key journeys with a blocker on
  1. Use a clean browser profile

    Install uBlock Origin (or use Brave with Shields up) in a fresh profile so extensions do not mix with your normal setup.

  2. Open DevTools

    Press F12, then open the Console and Network tabs. Reload the page. Blocked requests show as red entries with errors such as net::ERR_BLOCKED_BY_CLIENT.

  3. Run each core action

    Submit your lead form, add to cart, start checkout, open the menu, click the booking and chat buttons. Note anything that stalls or hides.

  4. Read the Console errors

    Errors like 'gtag is not defined', 'fbq is not a function' or 'Cannot read properties of undefined' on click or submit point at your code depending on a blocked script.

  5. Compare with blockers off

    Repeat in a normal profile. If it works there and fails here, you have found the dependency.

How to fix it

The rule is simple: tracking must never be in the way of the action. Your form, cart and navigation should work even if every third-party script fails. Then add guards so missing scripts do not throw errors.

Guard tracking calls so a blocked script cannot stop the submitjavascript
window.dataLayer = window.dataLayer || [];

function safeTrack(eventName, params) {
  try {
    window.dataLayer.push(Object.assign({ event: eventName }, params));
    if (typeof window.fbq === 'function') {
      window.fbq('track', 'Lead');
    }
  } catch (e) {
    // Tracking failed or is blocked. Ignore it.
  }
}

document.querySelector('#lead-form').addEventListener('submit', function () {
  safeTrack('generate_lead', { form: 'contact' });
  // Do NOT preventDefault and wait for a tracking callback.
});
Fix by platform
  1. Find the dependency

    Deactivate tracking, popup and A/B plugins one at a time while testing with a blocker on, to see which one breaks the form or menu.

  2. Remove the hard dependency

    Check your theme or form plugin for custom JavaScript that waits on a tracking callback before submitting, and change it to the guarded pattern above.

  3. Avoid hiding the page

    If an optimisation plugin hides content until its script loads, switch off that anti-flicker option or add a short timeout.

Form submit handler

Depends on a blocked script

  • Handler stops the submit and waits for a tracking callback
  • Blocker cancels the script, callback never runs
  • Visitor clicks and nothing happens

Independent of tracking

  • Form submits normally
  • Tracking is attempted in try/catch and may fail silently
  • Lead arrives either way

How to confirm it's fixed

Verification
  • With uBlock Origin on, the lead form submits and the thank-you page appears
  • With Brave Shields set to Aggressive, add to cart and checkout work
  • The Console shows no uncaught errors on click or submit
  • The page is visible without waiting for any third-party script
  • The lead reaches your inbox or CRM
  • With blockers off, tracking still fires as before

How to prevent it happening again

Habits that keep it fixed
  • Add a blocker-on test to your release checklist for forms and checkout
  • Review every new script, plugin or tag for whether core actions depend on it
  • Ask developers to wrap third-party calls in try/catch and feature checks
  • Set timeouts on any callback that gates a submit or page reveal
  • Retest after changing consent tools, A/B tests or tag manager setup

How FunnelGuard handles this

FunnelGuard does not check this yet. Testing journeys with ad blockers on is a possible future check, but it is not part of the product today.

Nearby, FunnelGuard runs your real customer journeys on a schedule with a robot visitor and checks each step, the tracking hits sent to platforms such as GA4, Google Ads and Meta, and whether test leads reach your inbox and CRM. That helps you notice when a form or checkout breaks for any reason, but it does not simulate a visitor with a blocker. The Free plan covers 1 site and 2 journeys with daily checks and no card.

To watch for this problem yourself, repeat the blocker test above after every release, and keep a browser profile with uBlock Origin or Brave Shields ready for it. Browser DevTools and error monitoring tools that log JavaScript errors from real visitors can also reveal repeated errors tied to missing third-party objects.

Questions people ask

Can ad blockers break my website?

Yes. If a form, button or page depends on a script that a blocker stops, such as a tag manager or tracking pixel, the action can fail. The visitor just sees something that does not work.

Why is my form not submitting with an ad blocker on?

Your submit code probably waits for a tracking callback or calls an object like fbq or gtag that never loaded. Open the Console with the blocker on, look for 'is not defined' errors, and make the form submit without waiting on tracking.

How do I test my website with an ad blocker?

Install uBlock Origin in a clean browser profile or use Brave with Shields up. Open DevTools, reload, and run your form, cart and checkout. Blocked requests show net::ERR_BLOCKED_BY_CLIENT in the Network tab.

Does Google Tag Manager get blocked by ad blockers?

Often yes. Many blockers and privacy browsers block the GTM and Google Analytics requests. Keep essential site functions out of GTM and guard dataLayer use so the site works if GTM never loads.

How do I stop a blocked script from breaking my page?

Never make a core action wait on a third-party script. Check that the global exists before calling it, wrap tracking in try/catch, load scripts with async or defer, and add a short timeout to any callback that gates a submit.

Can I make tracking work for visitors using ad blockers?

Some visitors choose not to be tracked, and you should respect that. Focus on making sure the site works for them. Do not try to evade blockers.

Does FunnelGuard test my site with ad blockers?

No. FunnelGuard does not check this yet. It runs your journeys as a normal robot visitor and checks steps, tracking hits and test leads, so test with a blocker manually.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.