Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Analytics or GTM endpoint blocked or down: how to find and fix it

OPS-231Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Most sites load analytics and ad tags through a script from googletagmanager.com (Google Tag Manager, or GTM) and send hits to endpoints such as google-analytics.com, analytics.google.com or googleadservices.com. This issue means one of those requests fails. The script may be blocked, return an error, time out, or never be requested at all.

Common causes of a blocked or failing analytics endpoint
CauseWhat you seeWho is affected
Content Security Policy (CSP) missing the Google hostsConsole error: Refused to load the scriptEvery visitor
Firewall, CDN or security plugin rule403 or challenge page for gtm.jsEvery visitor or a region
Wrong or deleted container IDgtm.js returns 404Every visitor
Container not publishedgtm.js loads but contains no tagsEvery visitor
Ad blockers and privacy browsersnet::ERR_BLOCKED_BY_CLIENTA share of visitors
Provider outage or network fault5xx errors or timeoutsEveryone, usually briefly

Why it costs you leads or sales

Ad platforms learn from the conversions you report. If tags do not fire, Google Ads, Meta and others see no leads or sales. Smart bidding has less to learn from, audiences stop filling and reports show a drop that looks like a marketing problem when it is a tracking problem.

Where a blocked GTM script breaks the chain
  1. Ad clickVisitor lands on the page
  2. gtm.js requestBlocked, 403 or 404
  3. Tags fireGA4, Ads, Meta never run
  4. Conversion reportedPlatforms see nothing

The visitor converts, but nothing reaches your ad and analytics platforms.

Reported vs real leads during an outageExample numbers
Reported vs real leads during an outage (example)Real leads: 20 leads per day; Reported in GA4: 0 leads per day0815200Real leadsReported in GA4leads per day

Example: the form keeps working at 20 leads a day, but reported conversions fall to zero while the tag manager script is blocked.

How to check if your site has it

Find a failing analytics request in your browser
  1. Open the page in a private window

    Use a fresh window with extensions switched off so ad blockers do not confuse the result.

  2. Open DevTools and the Network tab

    Press F12 (or Cmd+Option+I on Mac), choose Network, tick Disable cache and reload.

  3. Filter for the tag hosts

    Type gtm.js, then collect and googleadservices in the filter box. Look for red rows, status 403, 404, 5xx, or (blocked).

  4. Read the Console tab

    Messages like 'Refused to load the script because it violates the Content Security Policy directive' point to a CSP problem.

  5. Test with Tag Assistant

    Open tagassistant.google.com, enter your URL and check that the container connects and your tags fire.

  6. Check GTM Preview mode

    In GTM, click Preview. If the debugger cannot connect, the container snippet is missing or blocked.

How to fix it

Start with the cause you found in the Network and Console tabs. The fixes below cover the most common ones, then the platform steps.

Content Security Policy: allow Google Tag Manager and Google Analyticstext
script-src 'self' https://www.googletagmanager.com https://www.google-analytics.com https://tagmanager.google.com;
img-src 'self' https://www.google-analytics.com https://www.googletagmanager.com https://*.google-analytics.com;
connect-src 'self' https://www.google-analytics.com https://analytics.google.com https://*.google-analytics.com https://*.analytics.google.com https://www.googletagmanager.com;
Fix by platform
  1. Confirm the container ID

    The ID (GTM-XXXXXXX) in your site must match the container in the GTM header. A wrong ID makes gtm.js return 404.

  2. Publish the container

    Click Submit, then Publish. An unpublished container loads but has no tags.

  3. Check triggers and consent settings

    Open Preview and confirm your tags are not held back by a consent trigger or a blocking trigger.

Standard GTM snippet (replace GTM-XXXXXXX)html
<!-- In <head> -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-XXXXXXX');</script>

<!-- Right after the opening <body> -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-XXXXXXX"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>

How to confirm it's fixed

Confirm tracking is back
  • gtm.js returns status 200 in a clean browser window
  • No CSP or blocked-request errors in the Console
  • Tag Assistant connects to the container and shows your tags firing
  • A collect request to Google Analytics appears in the Network tab after a page view
  • A test conversion shows in GA4 DebugView or Realtime
  • Your ad platform pixel helper shows the event

How to prevent it happening again

Prevention habits
  • Re-test tracking after any change to security headers, firewall rules, CDN settings or caching plugins
  • Keep a note of every host your tags need and update the CSP when you add a tag
  • Publish GTM changes with a version name so you can roll back
  • Check tracking after theme, plugin or consent tool updates
  • Compare reported conversions with real form and order counts every week
  • Monitor the funnel from outside so a quiet failure raises an alert
How an unnoticed block unfolds
  1. Day 0

    A security header change blocks googletagmanager.com. Example timeline.

  2. Day 1

    Reported conversions drop, but traffic looks normal.

  3. Day 7

    The weekly report shows a collapse and someone starts digging.

  4. Day 8

    The CSP is fixed and tags fire again, but a week of data is gone.

How FunnelGuard handles this

FunnelGuard detects this today. A robot visitor runs your real customer journey on a schedule, from the EU or the US, and checks the tracking hits sent to GA4, Google Ads, Meta, TikTok, LinkedIn, Bing, Pinterest, Snapchat, X and Reddit. If the tag manager or analytics request is blocked or fails, the expected hits do not arrive and the step is flagged.

Questions people ask

Why is my Google Tag Manager not loading?

The most common causes are a wrong container ID, an unpublished container, a Content Security Policy that does not allow googletagmanager.com, or a firewall or plugin rule blocking the script. Open the Network tab, filter for gtm.js and read the status code and Console message to see which one applies.

How do I check if gtm.js is blocked?

Open DevTools, go to the Network tab, reload the page and filter for gtm.js. A status of 200 means it loaded. A 403, 404, a failed request or '(blocked)' means a problem. Check the Console for CSP errors too.

Why do I see net::ERR_BLOCKED_BY_CLIENT for Google Analytics?

That error means the browser or an extension, usually an ad blocker or privacy tool, blocked the request. Test in a clean private window with extensions off. If it loads there, the issue is with that visitor's browser and not your site.

Does a Content Security Policy block Google Tag Manager?

Yes, if script-src, connect-src or img-src do not list the Google hosts your tags use. The Console will show 'Refused to load the script' with the directive involved. Add the needed hosts, such as www.googletagmanager.com and www.google-analytics.com.

Can I tell if Google Analytics is down?

Check the Google Workspace Status Dashboard and look for failed collect requests in the Network tab with 5xx codes or timeouts. If other sites' tags fail the same way, it is likely a provider issue. Otherwise look at your own site's headers and firewall.

How do I know tracking broke before my reports show it?

Reports lag, so you usually find out days later. An external monitor that runs your journey on a schedule and checks that the tracking hits arrive can alert you the same day. FunnelGuard does this for GA4, Google Ads, Meta and other platforms.

Will ad blockers make my conversion numbers lower?

Yes. Some visitors block analytics and ad tags, so your reported numbers will sit somewhat below the real ones. That gap is normal and fairly steady. A sudden drop to near zero points to a real fault on your side.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

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.