Google Analytics 4 Debugging: How to Check If It's Working?

Once you set up Google Tag Manager, eager to collect data about your store performance, you must ensure it works as expected. You can check if GTM is working properly a couple of times but still don't get anything in your GA4.

Why is that? 

The answer's simple — GTM preview mode only allows you to debug tags stored in the GTM container. It doesn't show you whether this data ends up in Google Analytics.  So, some data might still be missing in GA4.

That's why you need to debug Google Analytics as well. And today you'll learn how to do that using the GTM preview mode we've just mentioned. 

The Difference Between GTM Debug and GA4 Debug?

As we've told you before, you shouldn't consider GTM Preview and Debug mode and GA4 DebugView to be the same thing. The former allows you to debug tags included in the GTM container, while the latter is used to show what data your GA4 properly receives. 

How to Enable GA4 DebugVeiw?

You will find different ways to enable DebugView in GA4 on the web. They will range from installing the GA Debugger Chrome Extension to adding a debug_mode to the GA4 tag. Each has its benefits. However, we prefer to work with the easiest way — GTM preview and debug more.

If you're already debugging GTM tags, why not debug GA4 at the same same time? 

So, let's start.

1. Enable debug and preview mode in GTM

Navigate to your GTM account and press on the Preview button while you're in your workspace. 

Google Tag Manager

A new window will open with the ?gtm_debug= parameter. That's all you need to do for the DebugView GA4 to work.

2. Find DebugView in Google Analytics 4

Go to your Google Analytics account > Admin > DebugView. You'll see the empty interface of the DebugView. For events to start firing, you need to do some actions on your store.

GA4 debugview 

3. Fire events on your website

Remember that debug tab that we've opened before in the GTM preview? For events to be displayed in Google Analytics you need to go back to that tab and do some actions. 

4. Explore the GA4 debug view interface

Once you go through your website pages, view some products, and add them to cart, you will see the data appear in the DebugView. Although it looks kind of overwhelming, let's make the picture more clear. 

Note: sometimes it takes a while for events to appear in the GA debug view. Be patient and Google Analytics will eventually show you the data.

  1. Minutes Steam — shows you the data for the last 30 minutes and the number in circles signifies the number of events received that minute.
  2. Seconds Stream — shows data on a more detailed level with the time corresponding to the time the event was logged on the device, and the name of the event. Here is also where you can click on the event to see the parameters, user properties and items. 
  3. Top Events — shows the top events logged within 30 minutes. By clicking on any of them, you will open parameters with timestamps sent in the last 30 minutes.
  4. User Properties — shows the set of user properties for a current device.
  5. Device Selector — allows you to choose what device data to debug.

GA4 debugview

Exploring different properties and their values in the Google Analytics DebugView enables you to check if all data from the data layer is captured by the GA properly. You can even do parallel debugging and check what data GTM passes to Google Analytics. 

How to Set Up Google Analytics 4 in Magento 2?

Don't get discouraged too soon if setting up GA4 doesn't go as expected. It takes some effort to configure Google Analytics 4 with GTM.

But it is even more daunting to create the GTM tags and make sure they are received properly by the GA4. That's why we've created the Magento 2 Google Analytics 4 Extension that will make this task easier.

Just specify your tracking IDs, export the preset tags to GTM and track all important events in GA4. Could it be any easier?