Content Groups in Google Analytics 4 – How to set them up and use them?

Companies put a lot of investments in the content of their websites. It is, therefore, very important to know how the content is performing – how it is doing in terms of views, engagement, conversions or any other business objectives? And exactly which content is performing better?

Content performance reports in GA4

Pages and screens report

Google Analytics 4 (GA4) already provides insight into content performance through the Pages and screens report which shows data about the pages users visited on the website.

Pages and screens report in GA4

Content groups

GA4 also shows content performance through content groups. A content group is a collection of similar website pages into buckets. Unlike the pages and screen report, content groups show data of related groups of information instead of individual pages.

Examples of content groups

A company website can have content groups showing various categories with similar information such as news, press releases and projects.

An e-commerce website can have its product categories as content groups such as shirts, shoes and can even go further into specifying men’s shirts or shoes and women’s shirts or shoes.

Advantages of content groups

Content groups are useful in understanding various sections of a website. This is especially important for large websites where reporting on individual page performance can be too granular and difficult to draw insight from.

Imagine, where rather than comparing performance between different distinct pages, you compare performance between your product or content categories themselves! This would greatly contribute to improving the performance of the website.

While the Pages and screens report is pre-made in GA4, the default content group in GA4 is not set. We will, therefore, have to configure it ourselves in order for us to report content performance based on content groups.

This article will show you how to create content groups in Google Analytics 4 using google tag manager. We will create a news content group for a company website that publishes news articles on its website – so that data of all news articles will be aggregated and reported from this content group.

Steps in creating content groups in GA4 using Google Tag Manager

Data Layer push

Our first step is ensuring that information of the news content group value is available in our google tag manager.

We will ask our developer to push the value of the content group to the datalayer using the code below.

data layer push for news content group

You will also have to prepare your datalayer.push code depending on the value of the content group that you will be sending when setting your content groups.

This code should be added above the GTM container in the code of your website. This enables the data to be available in the datalayer by the time the google tag manager loads and also before Google Tag configuration fires.

Placing the code below the GTM container tag also risks breaking the entire GTM event tracking implementation.

Verifying the datalayer.push

We can check if the code has been added to the datalayer by the developer through the preview and debug mode in google tag manager. We will click preview in our GTM workspace.

Preview mode in Google Tag Manager

Then we will connect to the webpage where we are setting up the content group by pasting its link in the website url section of the google tag assistant. Click connect.

Once successfully connected to the web page, two things happen:

  • A new browser window opens with the preview of the website page or section of which we are setting the content group – the google tag assistant at the bottom right corner shows that the connection is successful.
  • Another browser window opens the tag assistant debug interface showing a summary of events and tag information of the requested page. Part of that information includes what data is being passed to the data layer.
Successful datalayer push

A Message event appears on the left side of the screen showing that the datalayer.push was successful. Once clicked on, the output section on the right gives more details about the contents of the datalayer.

Specifically, the API Call section shows us what data was pushed to the datalayer. Once we toggle it, we see that it’s exactly the same data that we provided in datalayer.push code to the developer.

With our datalayer.push being successful, we will proceed to send this value as a content group to Google Analytics 4. We will do this by setting up an event parameter.

Setting up an event parameter

Event parameters provide additional information about the ways users interact with our website. In our case, we want it to provide the value of our content group to our google analytics property.

In order to set up the event parameter, we will first have to create a variable for the parameter.

Create a variable for the parameter

Back in our google tag manager workspace, we will click the variables menu on the left side.

We will then scroll to the user-defined variables section at the bottom and click new.

In the variable configuration section, we will select the Google tag: Event settings variable type.

We will then add content_group as the name of the parameter. This is the exact name that must be added as it is the predefined parameter for content groups in GA4. Any other name will have to be registered as a custom dimension.

In the parameter value to the right, we will need to enter a variable that returns the name of the content group that we are creating.

Since we are working with a datalayer, we will create a datalayer variable based on the data that we pushed to the datalayer.

To do so, we will click the add variable button to create the datalayer variable.

On the choose the variable section, we will click the plus sign at the top right corner to add the variable.

In the variable configuration section, we will choose the data Layer Variable.

We will then copy and paste the name of the parameter from the data layer in the field titled Data Layer Variable Name.

The name must exactly correspond to the value that is contained in our data layer. In our case, the value is page_group.

We will then proceed to name the variable – any name will work. What matters most is that the name of the Data Layer Variable Name field must be exactly as the value provided in the data layer. We will proceed and save.

Once saved, the data layer variable will be automatically added to our parameter variable alongside the name of the parameter.

We will proceed to name and save the variable.

In order to start sending the value of the content group to our GA4 property, we will need to update our GA4 Google tag with the content_group parameter that we have just created.

Updating the GA4 Google tag

Back in the google tag manager workspace, we will click on the tags section on the left side and select the GA4 configuration tag.

We will then edit the GA4 configuration tag by going to the shared event settings section and selecting the variable of the parameter that we have just created (GA4 – Event Settings). We will then click to save the update.

With that, we have finalised creating our content group in google tag manager. We can now test to verify if our set up is working and the content group value is being sent to our GA4 property.

Testing the content group set up

Back in our GTM workspace, we will click the preview button and connect to the tag assistant to debug our setup of the content group.

The usual debug interface will appear showing various tags, fired or not. We will click the GA4 configuration tag.

The GA4 tag configuration results below show that the content group was sent to GA4.

But we will not stop there. We will also have to verify if the content group data has actually been received in our GA4 account property. We will do so using the DebugView feature.

In our GA4 account, we will go to Admin > DebugView

You can see that the page_view event in our debugView shows that one of the parameters sent is content_group with a value of news under it.

Finally! We can say for sure that our content group has been successfully created. We will proceed to click submit and publish so that our changes are made effective and the data of our content group starts being sent to our GA4 property.

Where to find the content group report in google analytics?

The content group data is found in the Pages and screens report in our GA4 property.

In our GA4 account we will go to Reports > Engagement > Pages and screens

We will choose the content group from the dimensions dropdown.

There is our content group report! We see that we have already started receiving data about our news content group.

The content group data can also be found in the explorations report. We just need to import the content group dimension into any existing exploration report.

One thing that is important to note is that content grouping data will start showing in our google analytics reports 24 hours from the time that we created our content group.

Also noteworthy is the fact that content grouping doesn’t work retroactively. In other words, our content groups will start showing in our reports from the time that we have set them up onwards. Therefore, it’s important to create our content groups as quickly as possible.

Other important things to note about content groups in google analytics 4

  • GA4 currently only allows for one content group. This is unlike in universal analytics where we could create up to 5 content groups. To take full advantage, we must therefore apply it to our most valuable content.
  • We can create other content groups such as content_group1,2,3 etc. However, we will need to register them as custom dimensions in GA4 for them to work.

Content Groups in Google Analytics 4 – Conclusion

Content groups in google analytics 4 allow us to categorise content in buckets thereby enabling us to view content metrics based on related groups of information instead of individual pages. In so doing, content groups enable us to quickly understand how specific sections of our website are performing.

Using content groups, we can assess which of our product or service categories are performing well or not. Most importantly, we can establish how and which of our website content is helping in achieving our business objectives.

Content groups in GA4 are set up using google tag manager by sending the content group value to our google analytics account property.

While google analytics only allows for one content group, other content groups can be set up as custom dimensions.

Do you need any help?

Implementing Google Analytics is a challenge when you don’t have technical expertise.

We are here to help you with all your Google Analytics needs. We can train you and your team on how to set up and use Google Analytics, or you can leave everything to us and we can do it for you.

Contact us at or fill out the form at the Contact Us page.

Leave a Reply

Your email address will not be published. Required fields are marked *