How to Create Content Groups in Google Analytics 4

Cody Schneider8 min read

Figuring out which types of content on your website perform best can often feel like a guessing game. While Google Analytics 4 shows you performance for individual pages, you're left to manually piece together how your blog posts collectively compare to your product pages or case studies. This article will show you exactly how to solve this by creating Content Groups in GA4, allowing you to bundle similar pages together for clearer, more powerful analysis.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Are Content Groups in GA4 and Why You Need Them?

In short, Content Groups let you organize your website content into logical, high-level categories based on rules you define. Instead of looking at a fragmented list of hundreds of individual URLs, you can analyze performance by the sections of your website that actually matter to your business.

Imagine your analytics report showing this:

  • Blog Posts: 10,500 users, 45 conversions
  • Product Pages: 8,200 users, 120 conversions
  • Case Studies: 4,100 users, 25 conversions
  • Pricing Page: 2,500 users, 85 conversions

This is far more insightful than scrolling through a table trying to manually add up the performance of /blog/post-1, /blog/post-2, and so on.

By setting up Content Groups, you can answer critical questions like:

  • Do our blog posts attract more new users than our feature pages?
  • Which category of content leads to the most newsletter sign-ups?
  • How does user engagement differ between people viewing case studies versus those on product pages?
  • Are we getting a good return on investment for the content we're producing in each section?

Organizing your data this way moves you from drowning in raw page data to drawing actionable insights from well-defined content themes.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How Content Groups Work in GA4 (It's a Bit Different)

If you're coming from Universal Analytics (GA3), you might remember setting up Content Groupings directly within the Admin panel. In GA4, the process has changed. Content Groups are no longer configured as an Admin setting, instead, they are created by sending a specific event parameter with your pageview and other events.

The designated parameter is called content_group. Your job is to tell Google Analytics which category or "group" a page belongs to by sending this parameter on every page load.

There are two primary methods for doing this:

  1. Editing your website's code manually: You can have a developer add a script that identifies the page type and sends the content_group parameter along with your base GA4 tracking code. This offers total control but requires technical resources.
  2. Using Google Tag Manager (GTM): This is the most common and flexible method, especially for marketers and analysts. It allows you to create rules within the GTM interface to define your content and send the data to GA4 without touching a single line of site code.

For this tutorial, we will focus on the Google Tag Manager method, as it's the more accessible and scalable approach for most users.

Step-by-Step Guide: Creating Content Groups with Google Tag Manager

Before we start, we're assuming you have Google Tag Manager installed on your site and that your GA4 tracking is already configured through a GA4 Configuration Tag inside your GTM container.

Step 1: Plan Your Content Group Structure

First, take a moment to look at your site’s URL structure and decide on your categories. A common starting point for a SaaS business might be:

  • Blog: All URLs that start with /blog/
  • Product Features: All URLs that start with /features/ or /product/
  • Help Guides: All URLs that start with /help/ or /support/
  • Case Studies: All URLs that start with /case-studies/
  • Pricing: The page at /pricing
  • Homepage: The root domain (/)

The key is to identify consistent patterns in your URLs that can be used to categorize your pages. Jot these down, as you'll use them to build your logic in GTM.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Step 2: Create a "Regex Table" Variable in GTM

The most elegant way to manage content grouping rules is with a Regex Table variable. This variable will automatically look at the URL of every page visited and return the name of the content group it belongs to.

  1. In Google Tag Manager, go to the Variables section in the left-hand menu.
  2. Under User-Defined Variables, click New.
  3. Name your variable something descriptive, like regextable - GA4 Content Group.
  4. Click Variable Configuration and choose RegEx Table as the variable type.
  5. For the Input Variable, select {{Page Path}}. This tells GTM to use the part of the URL that comes after your domain (e.g., /blog/my-awesome-post).
  6. Now, let's create the rules in the "RegEx Table" section. Click + Add Row for each rule you defined in Step 1.

Here’s how you would configure the table based on our example plan:

  • Row 1: Pattern: ^/blog/.* | Output: Blog
  • Row 2: Pattern: ^/features/.* | Output: Product Features
  • Row 3: Pattern: ^/case-studies/.* | Output: Case Studies
  • Row 4: Pattern: ^/pricing/?$ | Output: Pricing
  • Row 5: Pattern: ^/$ | Output: Homepage

Quick Explanation of the Regex:

  • The ^ character means "starts with."
  • The /blog/ is the literal text we're looking for.
  • The .* means "any character, zero or more times." So, ^/blog/.* translates to "any Page Path that starts with /blog/."
  • The $ character means "ends with." This ensures we only match the exact pricing and homepage paths. The /? makes the trailing slash optional.

Finally, under Advanced Settings:

  • Check "Ignore Case" to ensure patterns like /Blog/ are also caught.
  • Check "Set Default Value" and enter a value like Other Pages. This is a crucial safety net. It ensures that any page that doesn't match your rules will still be categorized, showing you what might need to be added to your rules later.

Click Save to create your variable.

Step 3: Add the content_group Parameter to Your GA4 Tag

Now that you have a variable that can dynamically figure out the content group, you need to send its output to Google Analytics.

  1. In GTM, navigate to Tags in the left-hand menu.
  2. Click on your main GA4 Configuration Tag. (Note: If you use individual GA4 Event tags for pageviews, you'd add this there, but applying it to the Config tag is usually best practice as it covers all events triggered from the page.)
  3. Click on the Tag Configuration card to edit it.
  4. Under Fields to Set, click + Add Row.
  5. In the Field Name input, type exactly: content_group.
  6. In the Value input, click the lego brick icon and select the Regex Table variable you just created (e.g., {{regextable - GA4 Content Group}}).
  7. Click Save on the tag configuration.

Step 4: Preview, Test, and Publish Your Changes

Never publish changes without testing! GTM's Preview Mode is your best friend here.

  1. At the top right of your GTM workspace, click Preview.
  2. Enter your website's URL and click Connect. A new tab with your website will open, and a GTM Debugger window will connect to it.
  3. Browse to different pages on your site that should belong to your different content groups (a blog post, a features page, the homepage, etc.).
  4. For each page, look at the Tag Assistant (Debugger) window. Click on a page_view or user_engagement event in the summary on the left side.
  5. Select your GA4 Tag to see its details. Look for the content_group parameter in the 'Fields to Set' list.
  6. Verify that its value correctly matches the category you intended (e.g., on a blog post page, it should say "Blog"). Check your default value page too.
  7. Once you are confident everything is working correctly, go back to GTM, click Submit, give your version a descriptive name (e.g., "Added GA4 Content Grouping"), and click Publish.

And that’s it! Your GTM container is now configured to send content group data to GA4.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Where to Find Your Content Group Data in GA4

After publishing, it can take 24-48 hours for new parameter data like this to be fully processed and available in standard GA4 reports. Once it is, you'll be able to access it easily.

  1. Log in to your Google Analytics 4 property.
  2. Go to Reports > Engagement > Pages and screens.
  3. By default, the report table will have "Page title and screen class" or "Page path and screen class" as the primary dimension.
  4. Click the small dropdown arrow next to the primary dimension's name.
  5. In the search box that appears, type "Content Group" and select it.

The report will reload with your newly created categories as the primary dimension, showing you aggregated metrics like Views, Users, and conversions for each group.

Final Thoughts

Setting up Content Groups in Google Analytics 4 requires some upfront work in GTM, but the payoff is a much clearer and more intuitive understanding of your website's performance. By grouping pages into meaningful categories, you can quickly spot trends, compare content strategies, and make better-informed decisions.

While mastering GA4 configurations is powerful, we know that the real challenge often comes from putting those insights into context with your other business data from ads, sales, and e-commerce platforms. This is exactly why we built Graphed. We connect directly to your Google Analytics data alongside all your other sources, so you can stop manually pulling reports. You can simply ask questions in plain English - like, "Compare conversions by content group for users who came from Facebook Ads vs Google Ads last month" - and get an interactive dashboard in seconds, without ever needing to mess with custom reports in GA4 again.

Related Articles