To create great content that helps you to grow your business, it is important to understand what content attracts the most attention, maintains their attention, and ultimately, which pieces of content lead to conversions. 

Google Analytics content grouping is an optional feature that allows you to view your website pages in different groups set by you. By setting up content groupings, you gain the ability to view and access trends based on information that is specific and useful to you.

Google Analytics Content Grouping | Mackman Branding and Marketing Agency

Content Grouping – This contains your individual groups. You’re limited to a maximum of 5 per Google Analytics view.

Content Group – These are the individual groups that you will see inside your reports. You can create an unlimited number of groups inside a grouping.

Your content grouping could be ‘Authors’ and your content groups would be ‘Author 1’, ‘Author 2’, etc.

What is Google Analytics content grouping?

Content grouping is the separation of your content into a more manageable and relevant arrangement that reflects a closer representation of how you view your site. This is particularly useful in e-commerce sites, but all sites can benefit from content grouping. 

For example, organising your content into groupings such as ‘post topics’ or ‘word count’ would give a clearer indication of which topics and post lengths do better than others. A more e-commerce orientated example such as a clothing retailer would separate their content into groupings for Men, Women and Children. 

While you are limited to 5 groupings per view, within each grouping there is no limit to how many individual groups you can add. For example, for the Menswear grouping, you can add several groups such as Men’s Shirts, Men’s Trousers, etc. 

This makes for a more pinpoint comparison of your content/products, allowing you to pit the success of different post topics or product categories against another.

Why set up Google Analytics content grouping?

Google Analytics provides you with a thorough insight into how your individual pages perform with the All Page Report. 

Google Analytics Content Grouping | Mackman Branding and Marketing Agency
All Page Report

However, content groupings go one step further and give you a clearer picture of how each distinct section of the site performs. As you can see in the image below, it’s much easier to see which of the branded merchandise performs best.

Google Analytics Content Grouping | Mackman Branding and Marketing Agency
All Page Report With Content Groups

One key benefit of content grouping is that it allows you to organise your data in ways that work for you, such as creating custom segments or looking at behaviour flows.

Once you have your content grouping set up, it is easy to compare the metrics of those groupings. You can still focus on individual pages that are being tracked by clicking into your group. 

Google Analytics Content Grouping | Mackman Branding and Marketing Agency
Clicking Inside Content Group

For example, content grouping would allow you to compare the bounce rate across the different groups you’ve set up. This gives you a more accurate view of how each section of your site is performing, and gives you the ability to make targeted improvements.

Why set up content grouping for e-commerce?

You can use content grouping within e-commerce to see what styles of jeans are the most popular, whether people spend longer looking at men’s or women’s clothes, or how often people read your style guides before shopping.

Why set up content grouping for a blog?

Content grouping on a blog can be used to see which categories of posts people find most interesting, how popular each author is, or if your readers prefer different formats for your content.

How to use content grouping effectively

Group page types together

Depending on your site, setting up your groupings based on page type is usually the best place to start. This allows you to see what types of pages people find helpful and engaging. 

An example of this could be blog posts, case studies, service pages, and team pages. These will tend to follow your website navigation, making them easy to set up.

Segment groupings based on the customer journey

Group your content in the same way that you look at the consumer journey on your website and nest smaller product subgroups underneath each stage of the journey. This provides you with a complete picture of how consumers move through the funnel and which stage of the funnel requires more support.

How to choose your content groupings & individual groups

Choosing Groupings

You can only create 5 content groupings per Google Analytics view, therefore you’ll need to be selective in your choice of groupings.

For example, if your website is mainly a collection of blog posts, then you might want to use ‘Post Topic’ as the grouping title. You can then use the individual topics as group names.

If you manage an e-commerce website, you could consider using a top-level category such as ‘Women Clothing’ as your grouping title. Then you can have different groups such as trousers, tops, etc. 

These groupings are general enough to cover the majority of your content while staying within the maximum grouping limit.

Another reason to be selective is that you can not delete a content grouping once it has been created. It can only be turned on and off, or you can rename and rebuild your group.

Choosing Groups

While you’re able to create an unlimited number of content groups within your grouping, this doesn’t mean you should try and group every page. Depending on how your site is structured and how you choose to implement your groupings, it could require the help of your website developer.

Content Group Ideas For Bloggers:

The following content groupings and groups are ideal for bloggers:

  • Authors
    • Author 1
    • Author 2
    • Author 3
  • Categories
    • Category 1
    • Category 2
    • Category 3
  • Word Count
    • 0-100
    • 101-300
    • 301-500
  • Post Style
    • List
    • How To
    • Infographics
  • Page Type
    • Blog Post
    • Category Page
    • Tag Page

Content Group Ideas For E-Commerce

If you run an e-commerce website, these are some content grouping ideas to get you started:

  • Gender
    • Male
    • Female
    • Children’s
  • Category
    • Shorts
    • T-shirts
    • Jeans
  • Page Type
    • Category Page
    • Product Page
    • Account Page
  • Price
    • £0-100
    • £101-200
    • £201-500

How to set up Google Analytics content groupings

There are a few ways you can set up content groupings on your site: Tracking codes, Extraction, and Rule Definition. You’re able to use a mixture of the three which we find ourselves doing regularly. 

Your website structure, confidence in editing code and the platform your site is built on will influence how you choose to set up your groupings. However, the first few steps are all the same!

First steps:

  1. First head to the Google Analytics view where you’d like to set your content groupings. This will most likely be the same view you use for your reporting.
  2. Next head to the admin tab and under the view column, click on the “Content Grouping” option and then the red “New content Grouping Button”.
  3. Creating a new content group in Google Analytics
  4. Give your content grouping a useful name so you know what kind of grouping you’ve set up. 
  5. This is the stage where you’ll decide how you want to set up the tracking for your different content groups using either the tracking code, extraction or rule definitions. You can read below how to set these up.

Rule Definitions

The easiest place to start is rule definitions. First, you’ll have to give the group a name. Following on from the examples above, this could be Men’s T-shirts, Men’s Shorts, Men’s Shoes etc. For the page types, you could have Blog, Case Study and Service Pages.

Once you’ve named your group of pages, you’ll then need to define the rules that match those pages. You can match pages based on the Page URL, Page Title, or if it’s an app, a Screen Name. You’re also able to define more than one rule for that group by using the “and” and “or” buttons.

Google Analytics Content Grouping | Mackman Branding and Marketing Agency
Creating a content group via Rule Definitions

There is a wide range of operators you can use in your rule definitions. These include:

  • Exactly Matches
  • Contains
  • Starts With
  • Ends With
  • Matches Regex
  • Is One Of
  • Does Not Exactly Match
  • Does Not Contain
  • Does Not Start With
  • Does Not End With
  • Does Not Match Regex
  • Is Not One Of

As an example, if your men’s shorts URLs were structured then you would set your rule definition as:

page contains /mens/shorts/

For the page types, if all of your case studies had the client name along with “Case Study” in the page title, you could group your case studies based on the page title.

Page title contains Case Study

Group Via Extraction

Grouping via extraction allows you to create content groups based on the Page URL, Page Title, or if it’s an app, a Screen Name using regex capture groups.

This allows you to be more selective when creating groups if your URL structure isn’t consistent.

An example of this could be grouping all of the men’s clothing categories to compare them with children’s clothes. Using the same URL structure as above, our regex rule would be /men/(.*)/

Google Analytics Content Grouping | Mackman Branding and Marketing Agency
Content Group Via Extraction

This filter will match all of the URLs that contain /men/ and anything following that. Eg /men/shorts/ or /men/shirts/

Group Via Tracking Code

The final way to group your content using Google Analytics content grouping is via the tracking code option. The tracking code option enables you to group your content based on a code snippet you include with your Google Analytics tracking code.

This is a slightly more complicated way of tracking your content groups, but it also gives you a lot of flexibility. For instance, if your Page Titles change, you don’t have to go back to Google Analytics and update your Extraction or Rule Definitions.

To set up your Content Groups based on a tracking code, you’ll need to head to the content groupings part of your Google Analytics view. Make a note of the index number (1-5) to the left of your content grouping name.

Next, head to your content grouping and select the tracking code option. Make sure the toggle button is set to enabled and you choose the index number that matches the one you made a note of in the previous step. This will then update the code snippets that are shown underneath the select index button. 

If you take a look at these snippets you’ll see that the content group is currently called ‘My Group Name’. You’ll want to update this with the actual name you want to give your group, such as trousers or case studies.

Google Analytics Content Grouping | Mackman Branding and Marketing Agency
Content Group Via Tracking Code

There are three code snippets you can choose from depending on the current tracking code you have installed on your website, Global Site Tag (gtag.js), Universal Analytics Tag (analytics.js) or Classic Analytics Tag (ga.js). 

If you’ve recently set up your Google Analytics account, you’re most likely using the Global Site Tag, and this is the example we’re going to be using, although the process is similar for all three types of tracking code.

The next step is to edit the global site tag that you initially added to the site when you first installed Google Analytics. If you’re using gtag.js (when looking at the tracking code you should see gtag mentioned) then you’ll need to edit the following line:

gtag('config', 'UA-XXXXXXX-X');

so that it includes the content group code as shown in the content grouping section.

The final result should look something like this:

<script async src=""></script>
     window.dataLayer = window.dataLayer || [];
     function gtag(){dataLayer.push(arguments)};
     gtag('js', new Date());
     gtag('config', 'UA-XXXXXXX-X', {'content_group3': 'Blog Posts' });

This is where the tracking code differs from the other two tracking options. If you replaced your current tracking code with the new, edited version, all of the pages on your site will be part of that content group, which isn’t very useful!

Depending on how your site is built and how comfortable you are with writing code, you can conditionally load the content group code on the pages that match that group. 

As an example, our site is built on WordPress, which means we can create a PHP snippet that loads the content group tracking when the post type matches a blog post. If the page on the website isn’t a blog post then it will load the normal tracking code without the content grouping.

Things to be aware of

  • The content grouping rules you set (tracking code, extraction, rule definitions) are matched in the same order you see on screen. This means that your tracking code will take priority, then any extraction rules and finally your definitions.
  • You can only set up 5 content groupings but each content grouping can have an unlimited number of groups.
  • You can’t delete content groupings, you can only turn them on or off. While you can edit your content groupings to track a different group it will still contain the old data from before you edited it.
  • Content groupings only take effect from when you created them. This means it won’t apply to any historical data and it may take a few hours before you can start to see them.


Google Analytics content grouping has a range of uses, but the most important is its role in ensuring that you know exactly what types of content are resonating with your readers. If you’re stuck setting up your content groupings leave us a message on our contact page and we can see how we can support you!