Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Consent banner script fails and page is unclickable: fix

CNV-131High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Most cookie banners work in two parts. A script loads from your consent tool, then it draws the banner and often adds a dark backdrop that sits over the page until the visitor chooses. If the script fails part way, the backdrop or a style that locks the page can stay while the banner itself never shows.

The result: the page looks normal, or slightly dimmed, but nothing responds to clicks. Visitors cannot press your call to action, open the menu or submit a form. There is no button to dismiss, because the banner never rendered.

This is different from a banner that is visible but sits on top of a button (CNV-124). Here the banner script itself has failed, so the page is blocked and the visitor has no way out.

Why it costs you leads or sales

Every visitor who hits the problem is stuck. They cannot click your main button, add to cart or send the form. Most will leave rather than hunt for a fix. Because the page loads and no error is shown, analytics rarely flags it. You just see traffic with no conversions.

It often affects only some visitors. Ad blockers, slow mobile networks, strict privacy browsers and a consent vendor outage can all make the script fail for a share of traffic while your own tests on a fast office connection pass.

Where the visitor gets stuck
  1. Visitor landsAd or search click opens the page
  2. Banner script failsBlocked, timed out or errors out
  3. Overlay staysInvisible layer covers the page
  4. CTA clickNothing happens
  5. Lead or saleNever reached

The banner script fails, the overlay stays, and every step after it is lost.

An unseen layer eats the click

The visitor clicks the button, but the leftover consent overlay receives the click instead.

How to check if your site has it

Test the page by hand
  1. Open the page in a private window

    Use a fresh private or incognito window so no saved consent choice hides the problem.

  2. Try to click your main button

    Click the main call to action, a menu link and a form field. If none respond, something is covering the page.

  3. Open the browser console

    Press F12 and open the Console tab. Look for red errors that mention your consent tool, such as a failed script, a blocked request or a JavaScript exception.

  4. Check the Network tab

    Reload and filter by the consent vendor's domain. A red, cancelled or very slow request means the script did not load.

  5. Inspect what is on top

    Right-click the button, choose Inspect, and look at which element is above it. Common culprits are a full-screen div from the consent tool, or a class on the body tag that sets overflow hidden or pointer-events none.

  6. Repeat with throttling and an ad blocker

    In the Network tab choose a slow 3G profile, then test again with a content blocker on. Failures that only appear here are the ones real visitors hit.

Find the element covering the pagejavascript
const el = document.elementFromPoint(window.innerWidth / 2, window.innerHeight / 2);
console.log(el, getComputedStyle(el).position, getComputedStyle(el).zIndex);
console.log('body overflow:', getComputedStyle(document.body).overflow);
console.log('body pointer-events:', getComputedStyle(document.body).pointerEvents);

How to fix it

There are two goals. Make the banner script load reliably, and make sure the page stays clickable even when it does not. The first steps apply to any site.

Fix the failing banner
  1. Find the cause of the failure

    Use the console and Network tab to see whether the script is blocked (404, 403, CSP error), times out, is hit by a JavaScript error, or conflicts with another script.

  2. Check your Content Security Policy

    If the console shows a 'Refused to load the script' message, add the consent vendor's domain to the script-src and connect-src rules of your CSP.

  3. Check the embed code

    Compare your snippet with the one in your consent tool's dashboard. Old domains, a wrong site ID or a deleted configuration are common causes of a failed load.

  4. Remove conflicting scripts

    Two consent tools, or a consent plugin plus a theme banner, can fight over the same overlay. Keep one.

  5. Add a safety net in CSS

    Make sure your own styles never leave the page locked. See the snippet below, and test that it does not hide a banner that loaded correctly.

  6. Load the script early and without delay plugins

    Do not defer or delay the consent script with a speed plugin if that causes it to load after the overlay styles. Exclude it from delay or combine options.

Where to fix it on your platform
  1. Find the banner source

    Check Plugins for a consent plugin, and your theme options for a built-in banner. Disable duplicates.

  2. Exclude from optimisation

    In your caching or speed plugin, exclude the consent script from minify, combine, defer and delay JavaScript options, then clear the cache.

  3. Test with plugins off

    Deactivate other plugins one by one on a staging copy to find a JavaScript conflict.

Remove the overlay if the consent script failshtml
<script>
  function fgUnlockPage() {
    document.documentElement.style.overflow = '';
    document.body.style.overflow = '';
    document.body.style.pointerEvents = '';
    document.querySelectorAll('.consent-overlay').forEach(function (el) { el.remove(); });
  }
</script>
<script src="https://consent.example.com/banner.js" onerror="fgUnlockPage()" async></script>

How to confirm it's fixed

Confirmation checks
  • In a private window the banner appears and the Accept and Reject buttons work.
  • After choosing, the banner and any backdrop disappear and the page scrolls.
  • With the consent script blocked (use the Network tab's block request option), the page is still clickable.
  • The main call to action and the form submit work on desktop and mobile.
  • No red consent-related errors remain in the console.
  • Test the page on a slow connection profile and with an ad blocker on.
Before and after the fix

Before

  • Script request fails or errors
  • Invisible overlay or scroll lock stays
  • Buttons and forms do not respond
  • Visitors leave with no error shown

After

  • Script loads, or fails safely
  • Overlay only exists when a banner is visible
  • Page stays clickable in every case
  • Visitors can reach the CTA and convert

How to prevent it happening again

Prevention habits
  • Retest key pages after changing consent settings, themes, plugins or your CSP.
  • Keep one consent tool only, and remove old snippets when you switch vendors.
  • Exclude the consent script from speed plugins that delay or combine JavaScript.
  • Build fail-safe CSS so the page never stays locked without a visible banner.
  • Watch your consent vendor's status page and plan for outages.
  • Run an automated click-through of your main journeys on a schedule.
Conversions on affected visitsExample numbers
Conversions on affected visits (example)Banner loads: 3 %; Script fails, page blocked: 0 %01230Banner loadsScript fails, page bl…%

Example: illustrative conversion rate for visits where the banner loaded versus visits where the script failed and the page was blocked.

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor opens your page on a schedule and checks for broken resources, which catches a consent script that fails to load. It also checks whether your main call to action is covered by another element, which catches the overlay left behind. When both signs appear, you know visitors cannot click.

A failed check is re-run from a second region before one alert goes out, so a one-off network blip does not wake you. The alert (email, Slack, Teams, WhatsApp, webhook or PagerDuty) includes a screenshot and a likely cause. FunnelGuard does not bypass CAPTCHAs or bot protection, and test traffic is marked with utm_source=funnelguard and fg_test=1.

The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month with a 3-day free trial, and a free read-only website audit is available.

Questions people ask

Why is my website not clickable because of the cookie banner?

Usually the consent script failed or loaded only partly, leaving a full-screen overlay or a scroll lock on the page. The banner never shows, so the visitor cannot dismiss it. Check the browser console for script errors and inspect which element sits above your button.

How do I remove a cookie banner overlay that blocks clicks?

First find the cause: a blocked or failing script, a CSP error, or a conflict with another plugin. Fix the load, remove duplicate consent tools, and add a fail-safe that removes the overlay if the script errors. Do not just hide a working banner.

Why does the cookie banner work for me but not for some visitors?

Ad blockers, privacy browsers, slow mobile networks and vendor outages can stop the script loading for some people only. Your fast, unblocked browser may always succeed. Test with throttling and a content blocker to reproduce it.

Can a cookie consent script break my whole site?

Yes. If it throws an error, loads late or leaves styles such as overflow hidden or a full-screen backdrop, it can make the page unusable. Good setups make sure the page still works if the script fails.

How do I test if my consent banner is blocking clicks?

Open the page in a private window, try clicking the main button, and run document.elementFromPoint in the console to see what element is on top. Also block the consent script in the Network tab and check the page still works.

Does a speed or caching plugin cause the banner to fail?

It can. Plugins that delay, defer or combine JavaScript may load the consent script too late or break it. Exclude the consent script from those options, clear the cache and retest.

How can I be alerted if my cookie banner blocks my page?

Use a synthetic monitor that loads your pages on a schedule and tries to click the main button. FunnelGuard checks for broken resources and a covered call to action, then sends an alert with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: no_broken_resources + covered CTA.

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.