Skip to content
FunnelGuard

Fix guide by FunnelsGuard

CMP script failing, so no tags load: how to find and fix it

OPS-328High 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 what each visitor chose. Examples include Cookiebot, OneTrust, Usercentrics, CookieYes and Complianz. Your tags (GA4, Google Ads, Meta pixel and so on) are usually set up to wait for its signal.

Why it costs you leads or sales

Your site still takes leads and orders, but your ad platforms and analytics get none of the conversion data. Ad bidding cannot learn which clicks convert, reports show a sudden drop, and retargeting audiences stop filling. Because the page looks fine, this can run for days or weeks before anyone notices.

What happens when the CMP script fails
  1. Visitor landsPage loads from an ad click
  2. CMP script loadsRequest blocked or errors
  3. Consent signal sentNever sent
  4. Tags fireGA4, Google Ads, Meta stay blocked
  5. Conversion reportedPlatforms see nothing

The break is at the CMP step. Everything after it never happens.

Conversions reported before and after the CMP failsExample numbers
Conversions reported before and after the CMP fails (example)Real leads: 20 conversions per day; Reported before failure: 17 conversions per day; Reported after failure: 0 conversions per day081520170Real leadsReported before failu…Reported after failureconversions per day

Example: real leads stay the same, but reported conversions drop to zero once the CMP script fails.

How to check if your site has it

Check whether your CMP is loading
  1. Open the site in a private window

    Use a fresh session with no saved consent. From the EU or UK, the banner should appear within a second or two.

  2. Open DevTools and the Console

    Press F12, open the Console tab and reload. Look for red errors mentioning your CMP domain, such as blocked by CSP, 404, ERR_BLOCKED_BY_CLIENT or a script error.

  3. Check the Network tab

    Filter by the CMP vendor name or domain. The script should return status 200. A 403, 404 or failed request means the script is not loading.

  4. Check that tags fire

    In the Network tab filter for collect (GA4), facebook.com/tr (Meta) or googleadservices. After accepting the banner you should see hits. If you see none, tags are blocked.

  5. Use Tag Assistant or GTM PreviewGoogle Tag Manager

    In Google Tag Manager Preview mode, check whether the consent initialization event ran and whether tags show as Not fired with consent as the reason.

How to fix it

First find the cause using the console error, then apply the matching fix below.

Common error and the usual fix
What you seeLikely causeFix
Refused to load script (CSP)Content Security Policy does not allow the CMP domainAdd the CMP domain to script-src, connect-src and img-src
404 on the CMP scriptScript ID or URL changed or removedCopy a fresh embed code from your CMP dashboard
Banner missing only on some domainsDomain not added in the CMP accountAdd the domain or subdomain in the CMP settings
Script loads but banner never showsJS error earlier on the page or minify and defer pluginExclude the CMP script from minify, combine and delay settings
Banner shows but tags stay blockedConsent signal not reaching GTM or the tagsFix tag order so the CMP fires first, and check consent settings
Fix by platform
  1. Exclude the CMP from optimisation

    In your caching or optimisation plugin (for example WP Rocket, Autoptimize or LiteSpeed), exclude the CMP script from minify, combine, defer and delay JavaScript. Clear the cache afterwards.

  2. Check the plugin or embed

    If you use a CMP plugin such as Complianz or CookieYes, confirm it is active and its license or account is valid. If you pasted a script, check it is still in the header.

  3. Check security plugins

    If a security plugin or host firewall adds a CSP header, allow the CMP domain.

Example CSP additions (replace with your CMP's real domains)text
Content-Security-Policy: script-src 'self' https://cmp.example-vendor.com https://www.googletagmanager.com; connect-src 'self' https://cmp.example-vendor.com https://www.google-analytics.com; img-src 'self' https://cmp.example-vendor.com;

For Google tags, set a default consent state before the CMP loads. If the CMP fails, tags then follow a known default instead of an unknown state. This snippet sets denied as the default for EU and UK visitors and must sit above your GTM snippet.

Default consent state before GTMhtml
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('consent', 'default', {
  'ad_storage': 'denied',
  'ad_user_data': 'denied',
  'ad_personal_data': 'denied',
  'analytics_storage': 'denied',
  'wait_for_update': 500
});
</script>

How to confirm it's fixed

Confirmation checks
  • The banner appears in a private window from an EU or UK location
  • No red CMP errors in the browser Console
  • The CMP script returns status 200 in the Network tab
  • After Accept, GA4, Google Ads and Meta hits appear in the Network tab
  • After Reject, marketing tags stay blocked as intended
  • GTM Preview shows the CMP tag firing first on Consent Initialization
  • Realtime reports in GA4 show your test visit

How to prevent it happening again

Prevention
  • Keep the CMP domain list up to date when you add domains or subdomains
  • Re-test the banner and tags after theme, plugin, caching and CSP changes
  • Keep CMP script exclusions in your optimisation plugin settings
  • Set a default consent state so a CMP outage fails safely
  • Watch your CMP account for license, billing and quota notices
  • Compare conversions in ad platforms with real leads each week
How an unnoticed CMP failure unfolds
  1. Day 0

    A plugin update or CSP change blocks the CMP script. The site looks normal.

  2. Day 1

    Conversions in GA4 and ad platforms fall sharply. Nobody is looking at them.

  3. Day 7

    Ad bidding has weeks of poor data. Someone asks why leads look low.

  4. Day 8

    The cause is found and the CMP script is fixed.

Tags wait for a consent signal that never comes

Example: the CMP fails, so the signal is never sent and tags stay blocked.

How FunnelGuard handles this

FunnelGuard detects this issue. A robot visitor runs your real customer journeys on a schedule, from the EU or the US, and checks the tracking hits your tags are meant to send to platforms such as GA4, Google Ads, Meta, TikTok and LinkedIn. This is done through its tag contract checks: if the hits you expect do not arrive, the check fails.

Questions people ask

Why are my tags not firing after I added a cookie banner?

Most often the CMP script is failing to load, so no consent signal is sent and tags set to wait for consent stay blocked. Check the browser Console and Network tab for errors on the CMP script, then confirm the CMP tag fires first in Google Tag Manager.

What happens to my tracking if my CMP goes down?

If tags depend on the CMP's consent signal, they will not fire while it is down, so analytics and ad platforms record no conversions. Setting a default consent state before the CMP loads makes the failure predictable instead of random.

How do I know if my consent banner script is blocked?

Open the page in a private window, press F12 and reload. Look in the Console for CSP or blocked-request errors and in the Network tab for a failed or non-200 request to the CMP domain.

Can a Content Security Policy break my cookie banner?

Yes. If your CSP does not list the CMP domains under script-src, connect-src and img-src, the browser blocks the script and the banner never appears. Add the vendor's domains from its documentation.

Can caching or minify plugins stop the CMP from loading?

Yes. Minify, combine, defer and delay-JavaScript options can break or postpone the CMP script. Exclude the CMP script from these settings and clear the cache.

Should I load tags without consent if the CMP fails?

No. For EU and UK visitors that would track people without consent. Fix the CMP and set a default denied state so tags stay blocked until a valid choice exists.

How do I get alerted when my CMP stops working?

You need a scheduled test that runs your real journeys and checks tracking hits arrive. FunnelGuard does this with its tag contract checks and sends one alert with a screenshot and a likely cause after a second-region re-check.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Tag contracts.

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.