GA4 Debugging
Learning Objective
After reading this guide you should have a better understanding of:
How to test that your GA4 property is pulling information
What to do if your property is not pulling through information
Contents
Video
Overview
Google Analytics 4 (GA4) is an analytics service that enables you to measure traffic and engagement across your websites and apps. From 01 July 2023 GA4 will be the sole solution offered by Google, as from this date UA3 properties will no longer process data. As a result, many of you will be transitioning and setting up your GA4 accounts following our onboarding documentation.
Regardless of how your integration is set up, you may wish to query how your integration works. This is where this document comes in handy. This guide will run you through:
Testing your website to ensure GA4 events are being captured
What to do if they’re not
Before Completing This Guide
It is advisable that you familiarise yourself with GA4. Whilst it is the next step in Googles analytics software it differs fundamentally to UA3 in many ways. Here are some useful, straight from the source resources that should be followed in the first instance - GA4 Training Resources
Testing GA4 - Tools Required
Before you can test GA4, you need to have a tool that can show us the data being sent. There are many tools out there on the market and you may have a preferred one you wish to use instead. The tool we will be referring to and using is https://chrome.google.com/webstore/detail/analytics-debugger/ilnpmccnfdjdjjikgkefkcegefikecdc.
To install this tool, simply follow the link above in a Chrome browser and click Add to Chrome. Once selected, an option will appear asking for confirmation. If you’re happy to do so, select Add extension. Within a minute or two the extension will be downloaded and can be accessed by clicking the little Jigsaw icon in your toolbar and selecting the Analytics Debugger icon:
Loading Analytics Debugger
As mentioned in the screenshot above, Analytics Debugger works in DevTools. To access and use it, you must open DevTools by doing one of the following:
Right-click on the page and select Inspect
Press together (Mac)
Command(⌘) + Option(⌥) + C
Press together (PC)
Control(⌃) + Shift(⇧) + C
From there, select the Analytics Debugger option from the DevTools headers (it should be the final option):
Pre-requisites
GA4 will fire always before cookies are accepted, however, depending on your setup rejection or non-interaction with cookie acceptance will instead use cookie-less pings and not send personal data in its tracking. For more information see GA4 Frequently Asked Questions | What is Google Consent Mode?archived.
For the purposes of testing, it is advised that the following conditions are met:
Cookies be accepted
Browsers allow for tracking
So long as both of these parameters are met tracking personal data should be possible. If you’re unsure of your settings, you can clear your cookies by following the guide here: Clear cache & cookies - Computer - Google Account Help.
Analytics Debugger
To start analysing what is being tracked you need to:
Follow the step here - GA4 Debugging | Loading Analytics Debugger
Click START DEBUGGING:
Testing Your Site
So, you have the tools, you’ve accepted cookies, and you’ve clicked START DEBUGGING. Now what?
As mentioned here - GA4 Frequently Asked Questions | Why does the data being captured in GA4 not match up to the data in Universal A...archived - GA4 uses events to track users. These are what you should look for when debugging to prove the data is firing.
To start, once you’ve clicked START DEBUGGING the easiest thing to do is run through a test order on your site. Whilst your progress you’ll notice your Analytics Debugger captures data under the GA4 tab. You will also be able to see the Datalayer history under the GTM/GTAG tab as you navigate through the pages.
Note: The common events you’ll see are:
add_to_cart
begin_checkout
add_shipping_info
add_payment_info
purchase
view_item_list
select_item
view_item
So what does this look like? Below are good examples of how the events display, showing you how events and the data attached to them differ depending on the tabs you’re using:
What is important?
When doing the testing you’ll see an influx of data and it can be quite confusing to really understand what you’re seeing. So what are you shown, and what does it mean?
Your GA4 integration is being sent Data from your site if:
Events are being logged during your journey
Your GTAG/GA4 property is displayed in the analytics debugger attached to events
You may have an issue with your setup if:
No events are firing or being displayed
Please refer to this if no events are displaying - GA4 Debugging | Site Checks
Your GTAG/GA4 property details are not showing against events
You may have multiple set ups in this instance. GA4 should only be set up once and it is recommended that you use the GA4 integration throug Visualsoft - GA4 Onboarding
Verifying in GA4
In your GA4 property navigate to GA4 Admin > Property > Events.
Note: it can take up to 48 hours for new GA4 events to be displayed
If GA4 is set up correctly, GA4 events will fire automatically within the VS platform on responsive sites and data should be captured in the GA4 property:
Next Steps
You should now know what tracking data is being sent to Google. The following scenarios provide you with the next steps depending on your findings above.
Events are showing, but they’re not appearing in GA4
GA4 can take up to 48 hours to verify any data it displays. It’s also common that not all data is displayed due to aggregation settings that Google uses. For more information please refer to our FAQ - GA4 Frequently Asked Questionsarchived
If the GA4 events are not being captured in the GA4 property after this period please raise a ticket with support who will be able to investigate further.
Note: If data continues to not appear it is also advisable to reach out to Google Support, particularly in scenarios where you have proven that Data is being sent through your own testing, and therefore the issue is possibly with data processing.
No events or GTAG/GA4 information are displayed
First, check the steps here have been followed: GA4 Debugging | Site Checks
Secondly, if no data is displayed, please check the steps in the onboarding documentation. If using the Visualsoft integration, you must have the settings populated correctly.
If no events display, please log a ticket with the support team.
Not all events fire
When completing events such as add_to_basket it can take a moment or two for Analytics Debugger to pick up the flag. Give each tracking option up to 5 seconds to fire.
I have another issue not covered in the FAQ
Please raise a ticket with our support team.
Summary
You should now be familiar with how to debug your GA4 setup. You will have the tools and knowledge necessary to better understand how and what data is being used for tracking.