Skip to content
FunnelGuard

Fix guide by FunnelsGuard

GA4 hits blocked or proxy endpoint failing: how to fix it

TRK-030Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

Every GA4 tag sends hits, which are small web requests, to a collection endpoint. By default that is google-analytics.com/g/collect (or a regional variant). Many sites change this on purpose. They send hits to their own domain, such as metrics.yoursite.com, through a reverse proxy, a CDN rule or a server-side Google Tag Manager (sGTM) container.

Where the hit gets lost
  1. Visitor opens pagePage loads normally
  2. GA4 tag runsBuilds the hit
  3. Request to endpointBlocked, 4xx or 5xx
  4. Google receives hitNothing arrives
  5. ReportsSessions and conversions missing

The page and the tag work, but the hit never arrives at Google.

Why it costs you leads or sales

Recorded vs real conversionsExample numbers
Recorded vs real conversions (example)Real conversions: 100 conversions; Recorded in GA4: 70 conversions0387710070Real conversionsRecorded in GA4conversions

Example: a proxy failing for part of the traffic means GA4 records fewer conversions than actually happened.

How to check if your site has it

Find the failing hit
  1. Open the Network tab

    In Chrome, press F12, open Network, tick Preserve log and reload the page.

  2. Filter for collect

    Type collect in the filter box. Look for requests to /g/collect on google-analytics.com or on your own domain.

  3. Read the status

    A healthy hit returns 200 or 204. Red entries, 403, 404, 5xx or (blocked) mean the hit failed. If there is no collect request at all, the tag itself is not running.

  4. Compare regions

    Test from another network or with a VPN you are allowed to use. A hit that works in one country and fails in another points to a regional block.

  5. Open GA4 Realtime

    In GA4, go to Reports, Realtime, then load your page. If you appear in Realtime, hits arrive. If not, they are being lost.

How to fix it

Fix the endpoint by platform
  1. Check the server container URL

    In your GA4 Google tag, open Configuration settings and check the server_container_url parameter. It must match a live sGTM domain.

  2. Test the server container

    Open the sGTM container, use Preview, and confirm the incoming GA4 client claims the request. Check the hosting (Cloud Run or App Engine) is running.

  3. Fall back if needed

    Remove server_container_url, publish, and hits go to Google directly while you repair the server side.

gtag config with a custom endpoint (remove transport_url to use the default)javascript
gtag('config', 'G-XXXXXXXXXX', {
  transport_url: 'https://metrics.yoursite.com',
  first_party_collection: true
});
Check that your proxy answersbash
curl -I "https://metrics.yoursite.com/g/collect?v=2&tid=G-XXXXXXXXXX&en=test"
Hit delivery

Before

  • Collect request returns 404 or 502
  • Realtime stays empty
  • Conversions undercounted

After

  • Collect request returns 200 or 204
  • Visit appears in Realtime
  • Conversions match real activity

How to confirm it's fixed

Confirmation checks
  • The /g/collect request returns 200 or 204 in the Network tab
  • Your visit appears in GA4 Realtime within a minute
  • The same works from a second network or region
  • A test form or purchase shows its key event in DebugView or Realtime
  • Daily sessions return to their usual level over the next days

How to prevent it happening again

Prevention
  • Monitor the proxy or sGTM domain separately from the website
  • Set a calendar reminder for certificate and domain renewals
  • Keep a note of who owns the server container and its hosting bill
  • Re-test hits after any CDN, firewall or DNS change
  • Watch GA4 for sudden drops in sessions by country

How FunnelGuard handles this

Questions people ask

Why is my GA4 not receiving data even though the tag is installed?

The tag can run correctly while its hits fail to arrive. Open the browser Network tab, filter for collect and check the status. A blocked, 4xx or 5xx response means the endpoint or proxy is the problem.

How do I check if GA4 hits are being blocked?

Open Chrome DevTools, go to Network, filter for collect and reload the page. A 200 or 204 means the hit was accepted. Red or blocked entries mean it failed. Test in a clean profile to rule out ad blockers.

Why is my GA4 server-side proxy returning 404 or 502?

Common causes are a wrong DNS record, an expired certificate, a deleted or stopped server container, or a proxy rule that does not forward /g/collect. Test the URL with curl and check your hosting logs.

What is transport_url in GA4?

It is a gtag setting that tells GA4 to send hits to your own server-side endpoint instead of Google's default. If that endpoint is down, hits are lost, so remove it to fall back to the default while you fix it.

Can GA4 be blocked in some countries?

Yes. Networks, regional rules and privacy tools can block the default Google endpoint for some visitors. Compare GA4 sessions by country and test from other regions to spot it.

Will a first-party proxy stop ad blockers from blocking GA4?

It can reduce blocking because hits go to your own domain, but it is not guaranteed and it adds a system that can fail. You must monitor it like any other part of the funnel.

Can FunnelGuard detect a failing GA4 proxy?

Partly. It detects that an expected GA4 hit is missing during a scheduled journey from the EU or US and alerts you. It does not confirm the exact cause or test every region, so check the collect request by hand.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: missing hit detected.

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.