GA4: How to create Content Groups

May 11, 2021 - Written by

Content Groups and Google Analytics 4: I was struggling with it and I finally managed to figure it out! Since it came out of beta, in the Engagement> Pages and Screens report, if you open the drop-down menu you can see that the last item contains the “Content Group” label, as shown in the screenshot below.

If as soon as you see something “new” you can’t resist and have to click on it to see what it contains, you will have found yourself in front of a bitter surprise: the default value is the well known and hated (not set).

I think I have tried in several ways possible – even quite creative and unorthodox – to modify the (not set) value with a real one: unfortunately everything still returned (not set).

In fact, at the moment there is no official guide or any hint from on the GA4 feature, but finally I succeeded and it is true that the solution is often the simplest!

Below I report the (few) steps necessary to create Content Groups in GA4 and also the limitations I encountered.

What are Content Groups

For those unfamiliar with them, content groups are groupings of content (yes ok, I can imagine…). They are so useful when you need to analyze aggregated metrics by category. As an example, if we think of an ecommerce selling sports products (eg Adidas, Nike, etc.) we could create content groups dedicated to Men (all pages / contents related to the category), Soccer Shoes (all contents / pages related to football shoes), Running Shoes, etc.

You can group similar contents into macro categories that you can analyze and compare (e.g. does the Man or Woman section generates the most events?)

How to create Content Groups in GA4

As I told before, after many attempts, the solution turned out to be really simple. Only two elements are needed: Google Tag Manager and the Google Analytics 4 configuration tag.

Let’s follow few steps:

  • Open or create the GA4 configuration file in Google Tag Manager.
  • Inside the “Fields to set” item, assign “content_group” as a parameter and the content you want to associate as a value. Being obviously based on page views, the content set as a parameter will necessarily be dynamic. So I invite you to create either a Regex LookupTable in GTM in which you pass the {{Page Path}} as a variable or trigger a custom event with the pageCategory to always being passed as a variable. In our case I preferred to use the first solution as the site’s URLs have a well-defined structure.
  • Now you just have to trigger it on all pages of your site.
  • Add content_group to the custom dimensions of your Google Analytics 4, otherwise you will not see anything in the reports!

Check the Content Groups in GA4

Obviously, before publishing your container, run a test in debug mode. Then check inside the “page_view” event that the “content_group” parameter is reported together with the associated value.

In the example I visited a content dedicated to optimization and the content_group parameter is valued with Optimize.

After about 24h from the moment you have set the content_group, inside the report you can start finding the first data.

Limitations of the Content Group in GA4

The following limits emerged from the tests we carried out:

  • The GA4 Content Group is activated in the dedicated report only if associated with the page_view event. If associated with a different event, the parameter is set but the report remains (not set)
  • We have not detected a limit in terms of the number of groupings you can set up as in Universal Analytics (5 by default)
  • We have tried to use other parameters such as “content_group_2” or “content_group2”, etc but we have not detected any hierarchy.
  • The parameter is available in BigQuery

Now you just have to set the content_groups and start analyzing!!

Comments 3 Replies to “GA4: How to create Content Groups”
  1. Thanks for the article. I have been trying to figure it out too as I find content groups very useful.

    WHere can I go to learn about how to “create either a Regex LookupTable in GTM in which you pass the {{Page Path}} as a variable or trigger a custom event with the pageCategory to always being passed as a variable.” ?

    THanks

Leave a Reply

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

  • Analytics Boosters
    Italy

    Vicolo Buranelli, 2
    31100 Treviso
    Italy


  • Analytics Boosters
    United Kingdom

    90 Long Acre, Covent Garden
    London - Greater London
    WC2E 9LY
    United Kingdom


  • Analytics Boosters
    United States

    80 S.W. 8th Street
    33130 - Miami
    Florida
    United States of America


CONTACTS

Contact us