Earlier this week a client asked me how they can ensure that their utm tracking was being collected properly by GA4 so I took the opportunity to introduce them to the GA4 debugger. I figured it might be useful for others so here’s a quick guide.
What is the GA4 debugger?
Simply put it is a way to check which events, parameters, and user properties are being sent by your browser and how they are being received by GA4. In Universal Analytics we typically would have achieved this by inspecting tags and hoping for the best, or because it was pseudo realtime by the end of life we wouldn’t have to wait too long to find our session and check that it had attributed correctly.
In GA4 this is more challenging as processing is much delayed and thresholding can mean that you’ll never find your session in the standard reports anyway. What we do have though is the DebugView which gives us an almost realtime timeline of our own session.
When we click into any event, for example the page_view event we can see everything that was sent with that event like so
We can see that the for this page_view event the medium has been set to Organic. I started the session by clicking through from Google so this is what I’d hope to see.
So how do we ensure that our own session is the one being picked up by the DebugView? There are actually a few different methods we can use but I’m just going to describe the easiest.
Enabling GA4 DebugView in Chrome
The most straightforward method of debugging your GA4 implementation is as follows:
Once you have done that simply enable it and you’ll see the icon in your Chrome toolbar switches “on” like so
You can now enter the DebugView in your GA4 property by entering the Admin section and selecting DebugView which sits at the bottom of the Data Display section
You then browse your website with the Debug extension enabled and after a minute or so you’ll start to see your session becomes visible in the DebugView. Sometimes you can kickstart this by browsing a few pages and then returning to GA4 and refreshing the page.
As you browse the website you’ll see more events added to the timeline and you can check that everything you expect is being collected for each interaction.
Testing UTM Parameters in GA4
So, the inspiration for this post was the question “How can we check that we’ve added the correct utm parameters to our links?”, well once you’ve got your DebugView working and collecting data you can simply open your utm tracked link in the browser tab that is being debugged and see what source/medium/campaign data is being collected. You can cross reference this against the GA4 Default Channel Grouping documentation and you’ll have a good idea which channel your link clicks will end up in.
For example if I want to tag a link back to my homepage as a referral with a specific campaign I know that I need to set the utm_medium to “referral” and let’s call the campaign “My-Cool-Campaign”, this means I’d setup my link to be something like:
If I copy this link and paste it into the browser tab being debugged I should be able to see these parameters in the next page_view event. And sure enough here we are:
The source, medium, and campaign parameters have all been pulled through. I can check these against the rules and be certain that this will appear as a referral session. This tracked link is good for me to send out now.
There’s a lot more you can do with the GA4 debugger which I’ll cover in future posts but for now hopefully this provides a bit of inspiration for one of the coolest new features in Google Analytics 4.