54 Solutions Logo White

What to do when DebugView in Google Analytics 4 is not working?

Table of Contents

DebugView is a powerful feature in Google Analytics 4 (GA4) that allows you to monitor the events and user properties that GA4 collects from your website or app in real time. This can help you troubleshoot issues as you install your tags or test your analytics implementation.

However, sometimes DebugView may not work as expected and you may not see any events or data in the report. In this article, we will explore some possible reasons why this happens and how to solve it.

GA4 is blocked by browser extensions or the browser itself

One of the most common reasons is that some browser extensions or settings may block GA4 from sending or receiving data. For example, ad blockers, privacy tools, or anti-virus software may interfere with GA4 tracking or reporting. To check if this is the case, you can try the following steps:

  • Disable any browser extensions that may block GA4, such as uBlock Origin, Ghostery, Privacy Badger, etc.
  • Clear your browser cache and cookies and reload the page.
  • Try using a different browser or an incognito window to see if DebugView works there.
  • Check your browser console for any errors or warnings related to GA4.

If DebugView works after disabling some extensions or changing your browser settings, then you have identified the source of the problem and you can either whitelist GA4 in those extensions or use a different browser for debugging.

Remember to select a device or refresh the page

Another possible reason is that you have not selected a device to monitor or you have not refreshed the page after enabling debug mode. Debug mode allows you to send events to DebugView from your personal device without affecting other users’ data. You can enable debug mode for your website using Google Tag Assistant, preview mode in Google Tag Manager (GTM), or adding a debug_mode parameter to your GA4 tag. However, after enabling debug mode, you need to do two things:

  • Select your device in DebugView by clicking on the drop-down menu at the top right corner and choosing the device that matches your browser user agent.
  • Refresh the page where you have enabled debug mode and start triggering events.

DebugMode wasn’t enabled right

Sometimes, DebugView may not work because debug mode was not enabled correctly. This can happen if you have made a mistake in your GA4 tag configuration or if you have used an incompatible method to enable debug mode. For example, if you are using GTM to deploy your GA4 tag, you should not use the GA Debugger Chrome Extension or add a debug_mode parameter to your tag manually, as these methods may conflict with GTM’s preview mode. Instead, you should use GTM’s preview mode to enable debug mode for your website and select the GA4 Event tag that contains your measurement ID. To check if debug mode was enabled correctly, you can do the following:

  • Verify that your GA4 tag is configured properly and contains the correct measurement ID.
  • Check that you have used the appropriate method to enable debug mode for your website or app.
  • Use Google Tag Assistant or GTM’s preview mode to inspect the events that are sent to GA4 and make sure they contain a _dbg parameter with a value of 1.

GTM Server-side requires a unique approach

If you are using GTM Server-side to send events to GA4, you may encounter some challenges when using DebugView. This is because GTM Server-side works differently from GTM Web or GTM App and requires a unique approach to enable debug mode and monitor events. For example, if you are using GTM Server-side with GTM Web, you need to do the following:

  • Enable preview mode in both GTM Web and GTM Server-side containers.
  • Add a _dbg parameter with a value of 1 to your HTTP request URL in GTM Web.
  • Select your device in DebugView by matching the client ID that is sent in the HTTP request.

If you are using GTM Server-side with GTM App, you need to do the following:

  • Enable preview mode in both GTM App and GTM Server-side containers.
  • Add a _dbg parameter with a value of 1 to your event parameters in GTM App.
  • Select your device in DebugView by matching the app instance ID that is sent in the event parameters.

If you are using GTM Server-side without GTM Web or GTM App, you need to do the following:

  • Enable preview mode in GTM Server-side container.
  • Add a _dbg parameter with a value of 1 to your HTTP request URL or event parameters.
  • Select your device in DebugView by matching the client ID or app instance ID that is sent in the HTTP request or event parameters.

Check GA4 filters (internal and developer filters)

GA4 has two filters that can affect DebugView: internal traffic filter and developer traffic filter. These filters allow you to exclude or include data from certain IP addresses or devices in your GA4 reports. However, they can also affect DebugView if they are not configured properly. For example, if you have enabled an internal traffic filter to exclude data from your own IP address, you may not see any events in DebugView from your device. Similarly, if you have enabled a developer traffic filter to include data only from devices that have debug mode enabled, you may not see any events in DebugView from other devices. 

To check if these filters are causing issues, you can do the following:

  • Go to Admin > Data Streams > More Tagging Settings > Internal Traffic Filter in GA4 and make sure your IP address or device is not excluded by the filter.
  • Go to Admin > Data Streams > More Tagging Settings > Developer Traffic Filter in GA4 and make sure your device is included by the filter or the filter is disabled.
  • Refresh the page and trigger some events to see if they appear in DebugView.

Other things blocking GA4 debug mode

There may be other factors that are blocking GA4 debug mode and preventing DebugView from working. For example, some of these factors are:

  • Privacy controls: If you have implemented privacy controls on the client-side, such as consent mode or user opt-out, you may not see any events in debug mode if the user has not given consent for analytics cookies or has opted out of analytics tracking.
  • Firewall or network settings: If you are using a firewall or a proxy server that blocks GA4 requests or responses, you may not be able to send or receive data in debug mode.
  • Browser compatibility: If you are using an outdated or unsupported browser that does not support GA4 features, such as gtag.js or the Measurement Protocol API, you may not be able to use debug mode.

To check if any of these factors are affecting DebugView, you can try the following steps:

  • Test your website or app on different devices and browsers to see if debug mode works there.
  • Check your firewall or network settings and make sure they allow GA4 requests and responses.
  • Update your browser to the latest version and make sure it supports GA4 features.

Frequently Asked Questions

Q: How do I enable debug mode for GA4?

A: You can enable debug mode for GA4 using Google Tag Assistant, preview mode in GTM, adding a debug_mode parameter to your GA4 tag, or using the GA Debugger Chrome Extension.

Q: How do I select my device in DebugView?

A: You can select your device in DebugView by clicking on the drop-down menu at the top right corner and choosing the device that matches your browser user agent, client ID, or app instance ID.

Q: How do I disable debug mode for GA4?

A: You can disable debug mode for GA4 by removing the debug_mode parameter from your GA4 tag, disabling preview mode in GTM or Google Tag Assistant, or disabling the GA Debugger Chrome Extension.