English Posts

How to Implement Content Group in Google Analytics 4

how to implement content group in ga4

Content Groups allow you to create sections of the website, grouping contents in a convenient way for your analysis.

Let’s give some examples: I can create a specific group that shows me the most viewed Brands on my website or I can create Product categories to analyze, at a higher level, the interactions of users with the website.

In Universal Analytics it is possible to create up to 5 Content Groups, by going directly to the View settings.

5 content groups google analytics

Now the question arises: can we create Content Groups in Google Analytics 4?

The answer is: yes, but with some limitations.

Let’s start!

Content Groups in GA4

First, here’s where you can find the new Content Groups feature in Google Analytics 4: Reports> Engagement> Pages and screens, then by clicking on the “Content group” field, we can access the values:

content group google analytics 4

At first, without any implementation, what we will see is the value (not set):

content group ga4 not set

Let’s see, below, how to implement the solution to collect qualitative information.

How to implement the Content Group in GA4

The best solution is to go to Google Tag Manager.

You will need to use the configuration tag within the tag list (if you want to know how to set a Property in GA4 and where to retrieve the Measurement ID, read this post):

google analytics 4 configuration tag

Once selected, we will have to insert a parameter, inside the tag, to start creating the tracks to send the correct information within the Google Analytics 4 Report.

The parameter to be inserted is the following: ‘content_group‘ and must be inserted under Fields to Set :

content_group google analytics 4

Now, we need to type the value that needs to be collected under the content_group field.

In the example I propose to you, I want to collect the value of a variable, which I called {{DLV – productType}}:

content_group ga4

After setting up the trigger rules, let’s save the tag.

Save ‘content_group’ as a custom dimension

Now that, through GTM, we have set up the track to collect the information, we need to go to the Google Analytics 4 UI and save the content_group parameter as a custom dimension.

This step is mandatory if we want to see our value within GA4 Reports.

To do this, just click on Configure> Custom definitions> Create custom dimensions

custom dimension ga4

You will need to enter the following information:

  • dimension name: content_group. This value must be the same one typed in the GTM tag (beware of misspelling!)
  • Scope: Event
  • Description: is an optional value, which you can enter or leave blank
  • Event parameter: content_group
set custom dimension in ga4

Save the configuration.

Test the Implementation

Once you have entered the different configurations, go to Configure> Debug View and check, by browsing, that the values are correctly passed to Google Analytics 4.

In the screenshot you see below, I clicked on the ‘page_view‘ event and, among the parameters set, I also find the content_group key which collects the ‘usato‘ value:

debug view content_group ga4

The test was successful.

Now, I can publish all the implementations, by submitting the Container in GTM

Once this is done, it will be necessary to wait around 24 hours for the Content group dimension to be correctly populated in the dedicated report.

But, if everything is done right, I will see my information in GA4:

content group report ga4

Limits of the Content group in Google Analytics 4

At the time of this writing, GA4 allows you to collect only one type of Content Group.

It is not yet possible to have multiple types of Content Groups as is the case in Universal Analytics (up to 5, as written at the beginning).

Even doing several tests, the thing doesn’t work: inserting the ‘content_group‘ parameter twice, inside the Fields to Set, would result in the collection of the last value inserted in the Configuration tag:

parameter content_group ga4

Even trying to put an extra value like ‘content_group2‘ inside the tag, nothing would happen.

In fact, the parameter can be inserted in the Fields to Set in GTM, as you can see in the image below:

add content group parameter in gtm ga4

Once added, you can also find it as a parameter in GA4 Debug:

debug view ga4 content group

However, even trying to create the dedicated Custom dimension, the Google Analytics 4 Report will always show only one Grouping of Contents and not different as in the Universal Analytics version:

content group google analytics 4

Conclusions

Content Grouping is definitely a useful feature in Google Analytics.

Today it is not yet possible, in GA4, to have more Content groups as in Universal Analytics.

However, if we consider that, until a few months ago, the Content Group was not even present in GA4, while today it is, we can be confident that soon there will be a new release that will allow us to have different Content Groups.

As you have seen, implementing a new Content Grouping in GA4 is really very simple using GTM, so now you just have to try the solution on your website!

Good analysis!


You may also be interested by the following articles:

  • How to Implement Content Group in Google Analytics 4
    Content Groups allow you to create sections of the website, grouping contents in a convenient way for your analysis. Let’s give some examples: I can create a specific group that shows me the most viewed Brands on my website or I can create Product categories to analyze, at a higher level, the interactions of users […]
  • Server-side Tagging: what is it?
    Update: October 5th. Google Tag Manager Server Side is officially out of Beta, as confirmed by Google, and has entered a new phase. Announced in August 2020, Google Tag Manager Server-side is still a tool / theme unknown to most. There are many doubts and questions on the subject and in this post I want […]
  • Content Grouping in Google Analytics
    Note: this article refers to the Universal Analytics version. If you want to know how to implement Content Groups in GA4 via Google Tag Manager, you can read this blog post. Analyzing the contents of a website, has it ever happened to you that you want to know what are the performances of the main […]
  • Google Tag Manager: Lookup Table Variable
    The Lookup Table variable in Google Tag Manager allows you to read the value of an input and, if this value matches certain requirements, it will return some output. There are several situations where this variable can help us: rename a web page, rename the Source dimension for a social (Instagram, Facebook LinkedIn etc.) and […]
  • What Virtual Pages are in Google Analytics
    Pageviews are one of the best known metrics, present in almost all web analytics reports. This metric is populated with pageview hits, which are sent to Google Analytics every time we view a page or refresh the page itself. However, in recent years a series of technologies have developed that improve user navigation on the […]
  • How to track Virtual Pages: Google Tag Manager and Google Analytics
    In this post, we see how to track Virtual Pages with the help of Google Tag Manager and Google Analytics. If you don’t know what Virtual Pages are and learn more about how they can help you especially if you are tracking a Single Page Application, I suggest you to read my dedicated post. To […]
  • Google Analytics 4: Cross Domain Tracking
    In this post I’ll show you how to implement cross domain tracking in the new version of Google Analytics 4. With GA4 cross domain tracking is much easier than the Universal Analytics version, in fact: in Universal Analytics you had to set everything up within Google Tag Manager In Google Analytics 4 you can do […]

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *