If you’ve started the transition to GA4 this year, you may have found that some of the reporting features you were used to in GA3 are not yet in GA4. Some of these features make data analysis difficult and cause wrinkles for many specialists. These include the ability to exclude parameters from URLs or the Content Grouping setting. Some settings can be implemented without being officially described in the documentation. This is the case with Content Grouping.
What is content grouping for?
Content grouping is especially helpful for websites:
- With an extensive article/blog section categorized by topic
- With an extensive catalogue of products categorized by category, gender, season
- With many different page types (homepage, cart, category, detail, blog, article, etc.), in the division of pages by type
You can then see aggregated metrics for a given group of sites in the data and there is no need to create complex filters via regular expressions to get aggregated numbers for a given product category or, for example, traffic to travel blog articles.
For content specialists in particular, this setup will make their job easier and provide interesting insights into user interactions with individual sections of the site.
How to set up content grouping in Google Analytics 4?
Content grouping is not yet officially described in the documentation as a GA4 feature, but it is already possible to get some data into reports.
In the Engagement – Pages and Screens report, you can find the Content Group item in the drop-down menu.
In the Czech version of the interface this is Zapojení – Stránky a obrazovky and Skupina obsahu.
By default, you will only see the value (not set).
To change this value, you must set the Field to Set content_group in the GA4 Configuration tag to the appropriate value from the data layer within the GA4 implementation.
Currently, only one grouping is “supported” in the content_group parameter.
If you are serious about your analytics, you already have some content group sent to the data layer – most often just pageType, product or blog category, or page tags for example.
You then simply insert this value into the parameter and you’re done.
If you don’t have a value in the data layer, you can use a lookup or regex table or your own JavaScript and create rules directly in Google Tag Manager, e.g. according to the URL structure.
Then we recommend also pulling this value into a custom dimension in the Scope – Event in GA4 reports. Regardless of the support from the current interface, we will be able to use it in other reports or Google Data Studio.
Testing and limitations
The above content_group parameter is not yet officially documented in the GA4 documentation, so its use is at your own risk. We take no responsibility for the settings you make.
If you send content_group in a page_view event, it will automatically appear in the Engagement – Pages and Screens report mentioned above. If you want to use it elsewhere, you need to create a custom dimension.
It is unclear how many content_groups GA4 will officially support in the hierarchical structure. However, you can already post, for example, content_group_2,… _3, etc. and work with them in reports thanks to custom dimensions.
The procedure has been tested on several sites and taken from https://www.analyticsboosters.com/google-analytics/ga4-how-to-create-content-groups/