Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Checkout breaks with an ad blocker: how to find and fix it

CNV-200Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

An ad blocker is a browser extension (such as uBlock Origin or AdBlock Plus) or a built-in browser feature (such as Brave Shields) that stops requests to known advertising and tracking domains. Some blockers also hide page elements by name, for example anything with ad, promo or tracking in a class.

Why it costs you leads or sales

Shoppers who use blockers are often tech-aware and ready to buy. When the pay button does nothing, they rarely tell you. They leave, and your analytics may not show them either, because the blocker also hides the tracking. The loss is silent.

How a blocked script stops a purchase
  1. CartShopper clicks checkout
  2. Blocker stops scriptTracking or widget request is cancelled
  3. Script errorCode calls an undefined function
  4. Pay buttonDoes nothing or never appears
  5. OrderNever placed

The break happens when checkout code assumes a tracking script has loaded.

Checkout completion by browser setupExample numbers
Checkout completion by browser setup (example)No blocker: 62 %; Blocker, fragile checkout: 18 %; Blocker, fixed checkout: 60 %02448621860No blockerBlocker, fragile chec…Blocker, fixed checko…%

Example: illustrative numbers showing how a blocker-dependent checkout can lose completions for shoppers with blockers on.

How to check if your site has it

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

    Install uBlock Origin or AdBlock Plus in a fresh Chrome or Firefox profile. Also try Brave with Shields up.

  2. Open DevTools

    Press F12, go to the Console and Network tabs, and tick Preserve log.

  3. Run a full purchase path

    Add a product, go to checkout, fill every field and reach the pay button. Use your store's test mode for payment.

  4. Look for errors

    Red console errors like 'fbq is not defined' or requests marked 'blocked by client' (ERR_BLOCKED_BY_CLIENT) show what was stopped. Note whether the page still worked.

  5. Compare with blockers off

    Repeat in a normal profile. If only the blocker profile fails, you have this issue.

How to fix it

The principle: tracking must be optional. Purchase steps should never wait for, or break because of, a third-party script.

Fix by platform
  1. Find the culprit app or snippet

    Disable apps one at a time in a duplicate theme and retest with the blocker. Check theme.liquid and Settings > Customer events for custom pixels.

  2. Remove hard dependencies

    Wrap custom code that calls tracking functions in an existence check (see the code sample below).

Tracking that can never block the purchasejavascript
function safeTrack(fn) {
  try { fn(); } catch (e) { /* tracking blocked: ignore */ }
}

safeTrack(function () {
  if (typeof gtag === 'function') {
    gtag('event', 'begin_checkout');
  }
});

// Redirect even if the tracking callback never fires
var done = false;
function go() { if (!done) { done = true; form.submit(); } }
safeTrack(function () {
  gtag('event', 'purchase_click', { event_callback: go });
});
setTimeout(go, 1000);
Checkout code with and without a tracking dependency

Fragile

  • Button waits for a tracking callback
  • Calls fbq or gtag without checking
  • Pay widget loads only after a blocked script

Resilient

  • Callbacks have a one second timeout
  • Every call is guarded and wrapped
  • Pay button works with all third-party scripts blocked

How to confirm it's fixed

Confirmation checks
  • Full test purchase completes in Chrome with uBlock Origin on
  • Full test purchase completes in Brave with Shields up
  • Firefox with Enhanced Tracking Protection set to Strict also completes
  • Console shows no uncaught errors that stop checkout
  • Pay button is visible and clickable at every step
  • Order and confirmation email arrive as normal

How to prevent it happening again

Habits that keep checkout resilient
  • Add a blocker-on test to your release checklist for every theme, app or tag change
  • Review any new script for whether purchase steps depend on it
  • Require try/catch and existence checks in code reviews
  • Keep payment-critical scripts to your payment provider only
  • Retest after installing marketing apps, popups or chat widgets

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. FunnelGuard's robot visitor does not emulate ad blockers, so it cannot show you how checkout behaves for a shopper with one installed.

The kind of tool that fits is cross-browser or real-device testing, ideally with a blocker extension or privacy browser installed, plus manual QA. FunnelGuard covers a different part of the problem: it runs your real checkout journey on a schedule in a standard browser and checks that each step works and tracking hits are sent. That helps catch ordinary checkout breakages, but not blocker-specific ones.

Questions people ask

Why is my checkout not working with an ad blocker?

Your checkout likely depends on a script the blocker stops, such as a tracking tag, chat widget or a payment-related script on a blocked domain. When that script fails, code that expects it throws an error and the button or form stops working. Open DevTools with the blocker on and look for errors and ERR_BLOCKED_BY_CLIENT requests.

How do I test my checkout with an ad blocker?

Install uBlock Origin in a clean browser profile, open DevTools, and complete a full test purchase while watching the Console and Network tabs. Repeat in Brave with Shields up and Firefox with Strict tracking protection. Compare with a profile that has no blocker.

Do ad blockers block payment providers like Stripe or PayPal?

Usually not, since payment scripts are needed for purchases and are rarely on blocklists. Problems more often come from tracking, fraud, chat or marketing scripts. Always test your own setup, because lists and custom rules vary.

How do I stop tracking scripts from breaking my checkout?

Make tracking optional. Check that functions like gtag or fbq exist before calling them, wrap calls in try/catch, and never make a purchase step wait for a tracking callback without a short timeout.

Will server-side tagging fix ad blocker problems?

It can improve how much measurement gets through, because requests go to your own domain. It does not fix a checkout that breaks when a script is missing, so you still need guarded code and testing with blockers on.

Can FunnelGuard test checkout with an ad blocker on?

No. FunnelGuard does not emulate ad blockers. Use cross-browser or real-device testing with a blocker installed for this, and FunnelGuard for scheduled checks of the standard checkout journey.

Why does my checkout button disappear with an ad blocker?

Cosmetic filters hide elements whose class or ID looks like advertising, for example ad, promo or sponsor. Rename those classes in your theme or checkout code and retest with the blocker on.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

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.