Google Analytics 4 Content Grouping – Create Content Groups in GA4

Last Updated: May 20, 2022

What is content grouping in Google Analytics 4 (GA4)?

In the context of GA4, content grouping is a grouping of content groups.

Content grouping is made up of one or more content groups. 

What are content groups in GA4?

A content group is a set of web pages that are based on the same theme.

So in the case of a blog, a content group can be a set of web pages that are based on the same topic e.g. Google Tag Manager.

In the case of an ecommerce website, a content group can be a set of web pages that sell similar products e.g. shirts.

Let us suppose you sell shirts, trousers and sportswear for men in your ecommerce store. 

Your ecommerce store contains the following product categories:

  1. Men shirts
  2. Men trousers
  3. Men sportswear

Now all the web pages that sell shirts for men can be part of the ‘Men Shirts’ content group.

All the web pages that sell trousers for men can be part of the ‘Men Trousers’ content group.

All the web pages that sell sportswear for men can be part of the ‘Men Sportswear’ content group.

Since content grouping is made up of one or more content groups, the ‘Men’ content grouping can consist of the following content groups:

  1. Men shirts
  2. Men trousers
  3. Men sportswear

Following is the graphical representation of content grouping for men: 

content grouping men

Similarly, let us suppose that your blog contains the following content categories

  1. Attribution Modelling
  2. Google Tag Manager
  3. Google Analytics
  4. Facebook

Now all the web pages that contain content related to ‘Attribution Modelling’ can be part of the ‘Attribution Modelling’ content group.

All the web pages that contain content related to ‘Google Tag Manager’ can be part of the ‘Google Tag Manager’ content group.

All the web pages that contain content related to ‘Google Analytics’ can be part of the ‘Google Analytics’ content group.

All the web pages that contain content related to ‘Facebook’ can be part of the ‘Facebook’ content group.

Since content grouping is made up of one or more content groups, the ‘Blog’ content grouping can consist of the following content groups:

  1. Attribution Modelling
  2. Google Tag Manager
  3. Google Analytics
  4. Facebook

As a rule of thumb use content/product categories on your website/app for content groups.

Note: Unlike in GA3, you can create only one content grouping in GA4.

What is the advantage of using content grouping in GA4?

Through content grouping in GA4, you can quickly check the performance of a content group or compare the performance of different content groups with each other.

views by content group ga4

Content groups allow you to measure the performance of a set of web pages at the content category or product category level. 

content group ga4

Content grouping is especially useful if you have got a big website with hundreds or thousands of web pages and you can realistically measure the web pages performance, only at the group level and not at the individual page level.

How to create content grouping in Google Analytics 4

Follow the steps below:

Step-1: Decide the names and number of content/product categories which you will use as ‘content groups’ in your GA4 property. 

Let us suppose, you have decided to create the following content groups in GA4:

  1. Attribution Modelling
  2. Google Tag Manager
  3. Google Analytics
  4. Facebook
  5. Other

The content group ‘Other’ contains the web pages that do not belong to any of the following content groups:

  1. Attribution Modelling
  2. Google Tag Manager
  3. Google Analytics
  4. Facebook

Step-2: Identify all of the web pages which will be part of each content group. You can use regular expressions to identify all such pages. 

For example:

In order to identify all the web pages on my website that belong to the ‘Attribution Modelling’ content group, I can use the following regular expression:

attribution|model|online|offline|nonline

In order to identify all the web pages on my website that belong to the ‘Google Tag Manager’ content group, I can use the following regular expression:

google-tag-manager

In order to identify all the web pages on my website that belong to the ‘Google Analytics’ content group, I can use the following regular expression:

google-analytics

Similarly, in order to identify all the web pages on my website that belong to the ‘Facebook’ content group, I can use the following regular expression:

facebook

Step-3: Based on the logic you developed in step-2, create a new Regex Table variable in GTM that can identify all of the web pages which will be part of each ‘content group’.

Follow the steps below:

#3.1 Login to your GTM account and then click on the ‘Variables’ tab:

variables

#3.2 Click on the ‘New’ button next to ‘User Defined Variable’:

new button

#3.3 Click on ‘Choose a variable type to begin setup’:

choose variable type

#3.4 Scroll down and then click on the ‘Regex Table’:

regex table

#3.5 Enter a name for your Regex table variable. You will later reference the variable by this name. Let’s name the regex table variable as ‘Content Group’:

name variable

#3.6 Click on ‘Input Variable’:

input variable

You should now see a screen like the one below:

content group screen

#3.7 Select ‘{{Page Path}}’ as the Input variable from the drop-down menu:

page path

Note: If your input variable does not already exist then you would need to create a new one. You need an input variable in order to use a regex table variable.

#3.8 Click on the ‘+Add Row’ button:

add row

#3.9 Enter your input pattern and their corresponding output value in the first row and then click on the ‘+Add Row’ button:

add row button

From the screenshot above we can conclude the following:

If ‘page path’ contains any of the following words then make the corresponding web page, part of the ‘Attribution Modelling’ content group:

  1. attribution
  2. model
  3. online
  4. offline
  5. nonline

Note: The pipe symbol (|) separating the two words corresponds to the Logical OR operation.

#3.10 Enter your other input patterns and their corresponding output values in the regex table, row by row, from top to bottom like the one below:

regex table2

#3.11 Click on the ‘Set Default Value’ checkbox and then type ‘Other‘ in the default value text box:

set default value

This is what I am doing here:

If a ‘page path’ does not match any of the specified input patterns then make the corresponding web page part of the ‘Other’ content group.

#3.12 Under ‘Advanced Settings’ uncheck the following two checkboxes:

  1. Full Matches Only
  2. Enable Capture Groups and Replace Functionality
advanced settings

I unchecked the ‘Full Matches Only‘ checkbox because I want the regex table variable to do a partial match.

I unchecked the ‘Enable Capture Groups and Replace Functionality‘ checkbox because Google recommends not to use ‘Enable Capture Groups and Replace Functionality‘ if the ‘Full Matches Only’ checkbox is unchecked. 

I want the regex table variable to do a case insensitive match. That’s why I did not uncheck the ‘Ignore Case’ checkbox.

#3.13 Click on the ‘Save’ button on the top right-hand side to save the new regex table variable:

save regex table

Now we are to going to edit the GA4 configuration tag. It is the tag that is used to install GA4 on a website.

Step-4: Click on the ‘Tags’ tab and then click on the name of your GA4 configuration tag:

tags

Step-5: Click on the ‘Tag Configuration’ box:

tag config

Step-6: Click on the ‘Fields to set’ drop-down menu:

fields to set

Step-7: Click on the ‘Add Row’ button:

add row2

Step-8: Type ‘content_group’ in the ‘Field Name’ text box and type ‘{{Content Group}}’ in the ‘Value’ text box:

content group

Note:{{Content Group}}’ is the regex table variable we created earlier.

Step-9: Click on the ‘Save’ button to save your updated GA4 configuration tag:

save config

Now we are going to test our new regex table variable to see whether it works the way it is supposed to work.

Step-10: Click on the ‘Preview’ button on the top right-hand side of your GTM account to put your container in preview mode:

preview

Step-11: Enter the URL of an article page on your website and then click on the ‘Connect’ button:

connect

As soon as you click on the ‘Connect’ button you would be redirected to the article page on your website. 

Step-12: Navigate back to the Tag Assistant window and then click on the ‘Continue’ button:

continue

Step-13: Click on ‘Consent Initialization’ and then click on the ‘Variables’ tab:

consent initialization

Step-14: Scroll down until you find the ‘Content Group’ variable and then check its value:

content group variable

From the screenshot above we can conclude that the value of the ‘content group’ variable is ‘Attribution Modelling’ which is correct. Because the URL of the article that I entered earlier is related to attribution modelling.

Step-15: Once you are satisfied with the results then click on the cross button on the top left-hand corner to close the Google Tag Assistant:

close tag assistant

Step-16: Click on the ‘Stop debugging’ button:

stop debugging

Step-17: Navigate back to your GTM account and then click on the ‘Preview’ button.

Step-18: Repeat steps 11 to 17 to test other articles on your website and see what value is populated for the ‘content group’ variable in the Tag Assistant window.

Step-19: Navigate to the DebugView report in your GA4 property and then click on the ‘pageview’ event:

debugview

Step-20: Click on ‘content_group’ parameter:

content group parameter

You should now be able to see the value of your content group:

value

This proves that the value of the ‘content_group’ parameter are being passed to GA4.

Step-21: Navigate back to your GTM account and then click on the ‘Submit’ button:

submit

Step-22: Name your version and then click on the ‘Publish’ button to publish the container.

publish

That’s how you can create content groups in GA4.

Note (1): You cannot create content groups retroactively in GA4. The content groups that you create show data only from the date they were first created and going forward.

Note (2): You can include the same web page in multiple content groups.

Where can you see content groups in Google Analytics 4?

Once 24 hours have elapsed from the time you first set up content groups via GTM then follow the steps below to see content group data in GA4:

Step-1: Navigate to the ‘Pages and Screens’ report (under ‘Engagement’) in GA4:

page and screens

Step-2: Scroll down to the data table and then click on the dimensions drop-down menu:

dimensions drop down

Step-3: Click on ‘Content Group’:

content group2

You should now be able to see the content group data in GA4:

content group data 1

The other place where you can see the content group data in GA4 is in the exploration report. 

You just need to find and import the ‘Content group’ dimension:

exploration report

Note: When there is no content group data available, GA4 populates the content group dimension with (not set).

Content grouping in GA4 for mobile app

If you want to set up content grouping in GA4 for a mobile app then instead of sending the ‘content_group’ parameter with the pageview event (like we do in the case of a website) send the ‘content_group’ parameter with the ‘screen_view’ event

Registering the ‘content_group’ parameter as a custom dimension

When you register the ‘content_group’ event parameter as a custom dimension, it appears as a new data card in every event report where you (or GA4) are passing the ‘content_group’ parameter along with the event. 

Thus the use of custom dimensions enriches your existing event reports.

To register the ‘content_group’ event parameter as a custom dimension follow the steps below:

Step-1: In your GA4 property navigate to ‘Custom definitions’ under the ‘Configure’ tab:

custom definitions

Step-2: Click on the ‘Create custom dimensions’ button:

create custom definitions

Step-3: Create a custom dimension with the following configuration and then click on the ‘Save’ button:

save button

Step-4: After 24 hrs have elapsed, navigate to the ‘Events’ report (under ‘Engagement’):

events report

Step-5: Scroll down to the data table and then click on ‘page_view’ event:

page view

Step-6: Scroll down your screen until you see the data card named ‘content_group’:

data card
Google Analytics 4 Content Grouping - Create Content Groups in GA4 50

#1 Google Analytics 4 Intro

  1. What is GA4 (Google Analytics 4) – The Apps + Web Property?
  2. Key Benefits of Using Google Analytics 4 (GA4)
  3. How to upgrade to GA4 (Google Analytics 4)
  4. Google Analytics 4 (GA4) vs Universal Analytics – What is the difference?
  5. Google Signals GA4 – See demographics (gender, age) in Google Analytics 4
  6. Understanding Google Analytics Measurement ID (GA4)
  7. Google Analytics 4 training & tutorial with FREE GA4 ebook
  8. Using the GA4 (Google Analytics 4) Test Property

#2 Google Analytics 4 Integrations

  1. How to connect GA4 (Google Analytics 4) with Google Data Studio
  2. How to link GA4 (Google Analytics 4) with Google Ads
  3. How to link Google Search Console to Google Analytics 4 (GA4)
  4. How to Install Google Analytics 4 on Shopify

#3 Google Analytics 4 Events

  1. GA4 (Google Analytics 4) Event Tracking Setup Tutorial
  2. Understanding Event Parameters in Google Analytics 4 (GA4)
  3. Recommended events in Google Analytics 4 (GA4)
  4. Enhanced measurement events in Google Analytics 4 (GA4)
  5. Automatically collected events in Google Analytics 4 (GA4)
  6. How to set up GA4 Custom Events via Google Tag Manager
  7. Events Report in Google Analytics 4 (GA4)
  8. How to rename events in Google Analytics 4 (GA4)
  9. How to use Google Analytics 4 Event Builder

#4 Google Analytics 4 Conversions

  1. Google Analytics 4 Conversion Tracking Guide – GA4 Goals
  2. How to import conversions from GA4 property to your Google Ads account

#5 Google Analytics 4 Dimensions

  1. GA4 (Google Analytics 4) Dimensions Tutorial
  2. GA4 (Google Analytics 4) Custom Dimensions Tutorial
  3. GA4 User Properties (User Scoped Custom Dimensions) – Tutorial
  4. Event Scoped Custom Dimensions in GA4 – Tutorial

#6 Google Analytics 4 Metrics

  1. GA4 (Google Analytics 4) Metrics Tutorial with Free Google Analytics 4 Ebook
  2. GA4 (Google Analytics 4) Custom Metrics Tutorial
  3. What are predictive metrics in Google Analytics 4 (GA4)

#7 Google Analytics 4 Ecommerce

  1. GA4 (Google Analytics 4) Ecommerce Tracking via GTM – Tutorial

#8 Google Analytics 4 Specialized Tracking

  1. GA4 (Google Analytics 4) Enhanced Measurement Tracking Tutorial
  2. Cross Domain Tracking in GA4 (Google Analytics 4) Setup Guide
  3. GA4 Site Search – Tracking Site Search in Google Analytics 4
  4. GA4 (Google Analytics 4) Scroll Tracking Tutorial
  5. Self-referral Google Analytics 4 – Referral exclusion GA4
  6. GA4 (Google Analytics 4) Data Import Tutorial
  7. Google Analytics 4 Content Grouping – Create Content Groups in GA4
  8. How to track single page apps in Google Analytics 4 (GA4)

#9 Google Analytics 4 filters

  1. GA4 filters – Understanding data filters in Google Analytics 4
  2. How to create and test filters in Google Analytics 4 (GA4)?
  3. Exclude internal traffic in GA4 (Google Analytics 4) via IP filter

#10 Google Analytics 4 Explorations

  1. Free Form Report in GA4 (Google Analytics 4) – Exploration Report
  2. How to use the user lifetime report in Google Analytics 4 (GA4)
  3. How to use Path exploration report in GA4 (Google Analytics 4) – Path analysis
  4. How to use Segment Overlap Report in Google Analytics 4 (GA4)
  5. How to use the Funnel Exploration Report in GA4 (Google Analytics 4) – Funnel Analysis
  6. Cohort Exploration Report in Google Analytics 4 (GA4)
  7. How to Create Landing Pages Report in Google Analytics 4 (GA4)

#11 Google Analytics 4 Advanced

  1. Understanding Google Analytics 4 Sessions
  2. GA4 (Google Analytics 4) Measurement Protocol Tutorial
  3. How to build comparisons (advanced segments) in Google Analytics 4 (GA4)
  4. Understanding Automated Insights in Google Analytics 4 (GA4)
  5. Understanding Channel Groupings in Google Analytics 4 (GA4)
  6. Understanding Data Sampling in Google Analytics 4 (GA4)

#12 Google Analytics 4 Reporting

  1. How to create custom insights in Google Analytics 4 (GA4)
  2. How to use Debug View report in Google Analytics 4 (GA4)

#13 Google Analytics 4 Attribution

  1. Guide to Attribution Models in GA4 (Google Analytics 4)
  2. How to Change Attribution Models in GA4 (Google Analytics 4)?
  3. GA4 (Google Analytics 4) Conversion Paths Report in Attribution
  4. GA4 (Google Analytics 4) Model comparison report in Attribution
  5. Advertising Snapshot in GA4 (Google Analytics 4) Attribution

#14 Google Analytics 4 Audiences

  1. GA4 Audiences – Creating custom audience in Google Analytics 4
  2. How to create a remarketing audience in Google Analytics 4 (GA4)
  3. Understanding Audience Triggers in Google Analytics 4 (GA4)
  4. Google Analytics 4 (GA4) Predictive Audiences – Tutorial

#15 Google Analytics 4 BigQuery

  1. GA4 BigQuery – Connect Google Analytics 4 with BigQuery
  2. How to connect and export data from GA4 to BigQuery
  3. events_ & events_intraday_ tables in BigQuery for GA4 (Google Analytics 4)

Register for the FREE TRAINING...

"How to use Digital Analytics to generate floods of new Sales and Customers without spending years figuring everything out on your own."



Here’s what we’re going to cover in this training…

#1 Why digital analytics is the key to online business success.

​#2 The number 1 reason why most marketers are not able to scale their advertising and maximize sales.

#3 Why Google and Facebook ads don’t work for most businesses & how to make them work.

#4 ​Why you won’t get any competitive advantage in the marketplace just by knowing Google Analytics.

#5 The number 1 reason why conversion optimization is not working for your business.

#6 How to advertise on any marketing platform for FREE with an unlimited budget.

​#7 How to learn and master digital analytics and conversion optimization in record time.



   

My best selling books on Digital Analytics and Conversion Optimization

Maths and Stats for Web Analytics and Conversion Optimization
This expert guide will teach you how to leverage the knowledge of maths and statistics in order to accurately interpret data and take actions, which can quickly improve the bottom-line of your online business.

Master the Essentials of Email Marketing Analytics
This book focuses solely on the ‘analytics’ that power your email marketing optimization program and will help you dramatically reduce your cost per acquisition and increase marketing ROI by tracking the performance of the various KPIs and metrics used for email marketing.

Attribution Modelling in Google Analytics and BeyondSECOND EDITION OUT NOW!
Attribution modelling is the process of determining the most effective marketing channels for investment. This book has been written to help you implement attribution modelling. It will teach you how to leverage the knowledge of attribution modelling in order to allocate marketing budget and understand buying behaviour.

Attribution Modelling in Google Ads and Facebook
This book has been written to help you implement attribution modelling in Google Ads (Google AdWords) and Facebook. It will teach you, how to leverage the knowledge of attribution modelling in order to understand the customer purchasing journey and determine the most effective marketing channels for investment.

About the Author

Himanshu Sharma

  • Founder, OptimizeSmart.com
  • Over 15 years of experience in digital analytics and marketing
  • Author of four best-selling books on digital analytics and conversion optimization
  • Nominated for Digital Analytics Association Awards for Excellence
  • Runs one of the most popular blogs in the world on digital analytics
  • Consultant to countless small and big businesses over the decade
error: Alert: Content is protected !!