Skip to content
FunnelGuard

Fix guide by FunnelsGuard

CMP script fails to load and blocks all tags: how to fix it

TRK-296High impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

A consent management platform (CMP) is the tool that shows your cookie banner and records the visitor's choice. Examples include Cookiebot, OneTrust, Usercentrics, CookieYes and Complianz. Your tags are usually set up to wait for that choice.

This issue happens when the CMP script itself does not load. The request may return an error, be blocked, time out, or throw a JavaScript error. With no banner and no consent signal, a correctly configured tag setup holds every tag back. The result is no tracking at all, for every visitor.

Common causes: a changed or expired CMP script URL or account ID, a domain missing from the CMP's allowed domains list, a caching or minify plugin that rewrites or delays the script, a Content Security Policy (CSP) that does not allow the CMP domain, a CMP service outage, or a script that is loaded after the tags that depend on it.

Why it costs you leads or sales

Visitors can still fill in forms and buy, so the site looks fine. But the ad platforms see nothing. Conversions are not recorded, remarketing audiences stop growing, and automated bidding in Google Ads or Meta loses its signal and can spend badly. Your reports show a sudden drop that looks like a demand problem when it is a tracking problem.

Because the failure is silent, it can run for days. You only notice when someone compares ad spend with reported conversions.

Where the chain breaks
  1. Page loadsVisitor lands from an ad
  2. CMP scriptRequest fails or is blocked
  3. Consent signalNever sent
  4. Tags fireGA4, Ads, Meta wait forever
  5. Conversion recordedNothing reaches the platforms

The CMP script is the first link. When it fails, everything after it is lost.

Reported conversions before and after the CMP breaksExample numbers
Reported conversions before and after the CMP breaks (example)Actual leads: 20 conversions per day; Reported, CMP working: 18 conversions per day; Reported, CMP broken: 0 conversions per day081520180Actual leadsReported, CMP workingReported, CMP brokenconversions per day

Example: the real number of leads stays about the same, but reported conversions fall to zero once the CMP script stops loading.

How to check if your site has it

Check in your browser
  1. Open the site in a private window

    Use a fresh window so no saved consent choice hides the problem. If you see no banner, note it.

  2. Open DevTools and the Network tab

    Press F12, open Network, reload the page, and filter by the name of your CMP (for example cookiebot, onetrust, cookieyes or usercentrics).

  3. Look at the status of the CMP request

    A red entry, a 403, 404 or blocked status, or a request that never finishes means the script is not loading.

  4. Check the Console

    Look for errors such as 'Refused to load the script' (CSP), 'net::ERR_BLOCKED_BY_CLIENT', or 'Uncaught ReferenceError' mentioning the CMP.

  5. Check whether tags fire

    Filter Network by collect, gtm, fbevents or the platform names. If nothing is sent, tags are blocked. In Google Tag Manager, use Preview mode to see whether tags show as 'Not fired'.

How to fix it

Start by finding the cause from the Network and Console checks above, then apply the matching fix below.

Symptom, likely cause and fix
What you seeLikely causeFix
404 on the CMP scriptWrong or old script URL or account IDCopy the current embed code from your CMP dashboard and replace the old one
403 or 'domain not allowed'Your domain is not listed in the CMP accountAdd the domain (and www and staging variants) in the CMP settings
'Refused to load the script' in ConsoleCSP header blocks the CMP domainAdd the CMP domains to script-src, connect-src and img-src
Script requested but never runsMinify, defer or delay plugin rewrote itExclude the CMP script from optimisation and delay rules
Request times outCMP outage or slow networkCheck the CMP status page and add a fallback
Script loads after tagsWrong load orderLoad the CMP first, high in the head
Fix by platform
  1. Check the CMP plugin

    Open Plugins and confirm your CMP plugin (such as Complianz or CookieYes) is active and its license or account is valid. Re-save its settings.

  2. Exclude the CMP from optimisation

    In your caching or optimisation plugin, exclude the CMP script from minify, combine, defer and delay-JavaScript rules, then clear the cache.

  3. Look for conflicts

    Temporarily disable recently added plugins or switch the theme to find one that breaks the script.

Add a safety net so one failure does not silence everything
  1. Set a consent default before the CMP loads

    Set Google consent defaults in code so tags know the state even if the CMP never arrives. Choose the default that matches your legal advice for each region.

  2. Do not auto-grant on failure in the EU or UK

    Do not fire marketing tags as 'granted' when the banner fails in regions that need opt-in. A blocked tag is safer than a non-compliant one. Fix the CMP quickly instead.

  3. Load the CMP synchronously or early

    Avoid async delay rules that push the CMP behind other scripts.

Consent default set before the CMP and tag managerhtml
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('consent', 'default', {
    'ad_storage': 'denied',
    'ad_user_data': 'denied',
    'ad_personalization': 'denied',
    'analytics_storage': 'denied',
    'wait_for_update': 500
  });
</script>
<!-- CMP script goes here, then the Google tag / GTM snippet -->

How to confirm it's fixed

Confirmation checklist
  • The CMP script returns a 200 status in the Network tab
  • No CMP-related errors appear in the Console
  • The banner shows in a fresh private window
  • After you click Accept, GA4, Google Ads and Meta requests appear in the Network tab
  • In GTM Preview, tags move from 'Not fired' to 'Fired' after consent
  • The check works on mobile and on every key page, including the thank-you page
  • Your ad platform's diagnostics show events arriving again

How to prevent it happening again

Prevention checklist
  • Re-test the banner and tags after every theme, plugin, CSP or caching change
  • Keep all live and staging domains listed in your CMP account
  • Exclude the CMP script from minify, defer and delay rules
  • Keep the CMP account, plan and billing active
  • Subscribe to your CMP's status page
  • Monitor the journey on a schedule rather than relying on manual spot checks
How an unnoticed CMP failure unfolds
  1. Day 0

    A plugin update or CSP change stops the CMP script loading.

  2. Day 1

    Tags stay blocked. Visitors still convert, but nothing is reported.

  3. Day 4

    Ad platforms show a conversion drop and bidding degrades.

  4. Day 7

    Someone spots the gap and traces it to the CMP.

  5. Day 7+

    Script fixed, tracking resumes. The lost days of data are not recoverable.

How FunnelGuard handles this

FunnelGuard detects this issue today. A robot visitor runs your real journey on a schedule from the EU or the US. It flags broken third-party resources, such as a CMP script that fails to load, and missing hits, meaning the GA4, Google Ads, Meta or other tracking requests that should have been sent but were not.

When a check fails, FunnelGuard re-checks from a second region before sending one alert by email, Slack, Teams, WhatsApp, webhook or PagerDuty. The alert includes a screenshot and a likely cause. Test traffic is marked with utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent. It never bypasses CAPTCHAs or bot protection.

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.

A failed CMP keeps tags waiting

Without a consent signal, tags never get the go-ahead to fire.

See what a missing CMP does to your tagsInteractive
CMP script fails to load

Consent: blocked / denied

  • GA4no hit
  • Google Adsno hit
  • Meta Pixelno hit

No consent signal arrives, so GA4, Google Ads and Meta tags stay blocked and no conversions are reported.

Toggle the cause to compare a broken and a working CMP.

Questions people ask

Why is my consent banner not showing?

The CMP script is most likely failing to load. Open DevTools, check the Network tab for a failed request to your CMP domain, and look in the Console for CSP or script errors. Common causes are a wrong script URL, an unlisted domain, a CSP rule or a caching plugin that delays the script.

Why are my GA4 and Google Ads tags not firing after I added a cookie banner?

If your tags wait for consent and the CMP never sends it, they stay blocked. Check that the CMP script loads, that it fires before your tags, and that a consent update is sent after the visitor clicks Accept.

How do I know if my CMP is down?

Check your CMP provider's status page and test your site in a private window with extensions off. If the CMP request fails in the Network tab or no banner appears, the script is not loading. A scheduled synthetic check can also catch it without manual testing.

Can a cache or speed plugin break my cookie banner?

Yes. Minify, combine, defer and delay-JavaScript features can rewrite or postpone the CMP script so it runs late or not at all. Exclude the CMP script from those rules and clear the cache.

Should tags fire if the consent banner fails to load?

In regions that need opt-in, such as the EU and UK, marketing tags should not fire as granted when no choice was recorded. Set a cautious default, fix the CMP quickly, and confirm the right defaults for each region with your privacy adviser.

Can a Content Security Policy block my CMP?

Yes. If your CSP header does not allow the CMP's domains in script-src, connect-src and img-src, browsers refuse to load it. The Console shows a 'Refused to load the script' message naming the blocked domain.

Will I get the lost conversion data back?

Usually not. Hits that were never sent to the ad and analytics platforms cannot be recreated. Fix the CMP quickly so you stop losing data, and note the gap in your reports.

How can I be alerted when my CMP script stops loading?

Use a synthetic monitor that loads your pages on a schedule and checks third-party resources and tracking hits. FunnelGuard flags broken third-party resources and missing hits, then sends one alert with a screenshot and a likely cause.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: broken third-party resources + missing hits.

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.