Since everyone and their uncle is now jumping on the Google Analytics 4 bandwagon, what you’ll see is a lot of basic implementations of GA4.
And that is not at all bad. With a simple base tag and automatic measurements in place, you’ll get a lot. Engagement, scroll events, file downloads.
And of course, the good old page_view
. I want to feature this core event in this post, to make your life a bit easier.
What is collected in a default page_view?
Well.. not a lot, really.
The “page_location” is sent – which is the URL, including the https bit, and all url parameters, and a “page_referrer” – which is also in URL form.
What is not mentioned in the documentation above is that there is also a “page_title” that gets sent.
And that Page Title is very prominent in the reports. It’s the default.
And.. not without a reason, because the only other thing is the page_location, which is.. very unreadable.
A bit more readable is the “Page path” dimension in the GA4 interface. This is basically the page_location with the protocol and hostname stripped, but not the query parameters – those are still there.
Exclude Query Parameters: nope
GA4 currently has no option to exclude query parameters in the configuration section, like Universal Analytics had, in the view level.
This means that all pages with fbclid
, msclkid
and even gclid
will be there in your reports, making your precious page paths unique.
Not nice.
This means you will have to work around it during collection time.
Workaround
In the base tag of GA4, you can send a field that I like to call “clean_path“, and fill that with the GTM built-in variable {{Page Path}}
.
In that way, you have your lovely clean Page Paths available in GA4.
Make sure to add this parameter to your GA4 custom dimensions, too, so it will be available in the reports and in Data Studio.
Content Grouping
Pretty recently (as everything in GA4) this little drop-down item popped up:
With no indication of Content Grouping in the documentation, I was left wondering..
Can this field be populated? Will there be 5 groupings? Or just one?
After some experimenting, you can indeed use it via the content_group
parameter.
Unfortunately, the content_group2 parameter does not work for now.
And as always with GA4:
To be continued..
I will keep updating this post if there’s changes to this event. Thanks for reading!
If you liked this article, why not tweet a little link:
Thanks!
Luis Madrid says
Thank you por the post Jules. I was considering on set the {{Page Path}} variable as a default value for the page_location parameter but I was afraid this method was going to affect other traffic attribution parameters like utms reading, etc…
¿Have you tried it?
jules says
page_location is built-in, I wouldn’t change it, it might break something.
Andrew says
Thaks for the tips.
One more disapointing from new update.
Anyway, maybe using a dataLayer to separate content will be more usefull.
Like
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
“event”: “pageview”,
“pageType”: “Blog”,
“pageLanguage”: “EN”,
“pageRubric”: “Analytics”,
“pageTag”: “aaa, bbb, ccc”
});
So, you going to be able to use more useful Content Grouping and add additional information for the next steps.
Andrew says
and one more thing, the Conten group is working only with page_view event.
Peter O'Neill says
Hi Jules – I was doing the same experiment yesterday on content grouping, good to get verification before I saw the data through. Given Page Title and Page Path (with query parameters) are fairly useless to us, would you agree that using Content Grouping for a user friendly page name and a custom parameter for Page Type is a decent approach initially? Hopefully with more GA4 features to follow to make this easier.
jules says
Hey Peter,
My approach would be to just fill pre-configured dimensions with what they’re meant for (or what they describe), unless your reporting doesn not give what you want.
In UA I always “Abuse” content groupings and throw in product names for example (so you have “landing page product”, w00t!).
In GA4 it’s still unclear what the limitions of the reporting interface will become, so any aproach that gives you what you want _now_ is a decent approach.
But.. if Google is going to release reports, or some AI based on content_groups (“this content group is driving revenue”) it’s good to have a nice amount of backfill.
(so.. a long answer that can be summarized as “it depends”)
Peter O'Neill says
I would say that right now the reporting interface for GA4 is frustratingly unusable so difficult to predict what will be available. Good to see we will have content groupings and channel groupings – I think more need to be added to classify & group dimensions (also to hide irrelevant dimensions from view).
It seems like a waiting game until more features are released so we then know how to design our solutions.
Fernando says
Hi Jules,
do you know any way to strip the query parameters from GA4 without using GTM? There is a website that I cant use GTM and it these parameters are driving me nuts… Can’t figure why google team decide on removing some key tools from GA4…
jules says
There is currently no way of doing it without GTM.
In Data Studio, the page path dimension is clean, so you at least have a version with ALL parameters stripped.
roel says
thanks! useful
Matheus says
I was going through some documentation and you’re also able to replace the page_title by sending it as a parameter in the pageview. Unless I’m doing something wrong and didn’t notice this seem to be a good way of “fixing” this