Troubleshooting
Below is a list of common issues that people come across when working with Google Analytics.
GA requests are not working / not displayed in the network panel or Omnibug
If a server-side GTM container is being used to handle the GA hits, then you will not always see the requests in the network panel / Omnibug. This is because when using a server-side GTM container, Google registers a service worker on the site, and that service worker is responsible for handling some of the GA requests. The Chrome (and other browsers) network panel is not configured to show the requests made by service workers.
The service worker comes from a request that looks something like this:
https://sgtm.biomedcentral.com/_/service_worker/55j0/sw_iframe.html?origin=https%3A%2F%2Fwww.biomedcentral.com&1p=1
Once registered, the service worker can intercept and manage GA tracking requests that are sent using methods like navigator.sendBeacon() or fetch() from the browser. It will not handle all GA requests.
The concept behind this mechanism is to improve the reliability of data collection by reducing the chance of lost events. This is possible because the service worker can cache requests if the user goes offline or closes the page too quickly. It will retry sending those requests when the connection is restored or the browser is re-opened.
Please note that these events are being collected, and will show up in Explorations. Unfortunately, Explorations do not show real-time data (there is about a day delay). While GA4 does offer real-time reporting, it is largely ineffective for situations like this, unless you have a very small amount of data coming in.
If you need real-time verification that your event is firing, please reach out to Ask Web Analytics or Ask Frontend Enablement. We can put the server into debug mode and test that the request is received and forwarded onto GA.