How to Use Content Grouping In Google Analytics


If your site has a lot of content pages, analytics can be a challenge. Sure, you can identify the best and worst performing pages, but how can you analyze the performance of different categories, different groups, of content as a whole?

Content Grouping is a feature in Google Analytics that allows you to compare aggregate metrics for similar kinds of content on your site. You can group content in a way that’s logical for your site structure and analytics goals.

For example, say you run an online retail store. You might want to create Content Groups for Men and Women. Then within each group, you have product pages for Shirts, Pants, Outerwear, etc.


Then, you can easily compare statistics for each type of clothing within a group (e.g. Women’s Pants vs. Women’s Shirts). You can compare sales by Department, individual pages, and a lot more.

The concept is a little difficult to wrap your head around (at least it was for me), so let’s look at another example:

Say you have an ecommerce site that sells cellphone accessories. These are your general product categories:

  • iPhone accessories:
    • Cases
    • Screen protectors
    • Charging docks
  • Android accessories:
    • Cases
    • Screen protectors
    • Charging docks
    • Styluses

And say you want to compare your overall sales for iPhone and Android accessories. You would create:

  • Content Grouping: Accessories
  • Content Groups: iPhone and Android

Or say you wanted to compare the performance of different Android accessories. You would create:

  • Content Grouping: Android
  • Content Groups: Cases, Screen protectors, Charging docs, Styluses

In essence, content grouping makes it way easier to determine how your different content categories or product categories are performing compared to each other.

Content Grouping Setup

Google Analytics allows you to create up to five Content Groupings and unlimited Content Groups.

To get started, head to Google Analytics, go to Admin, and then Content Grouping:


Then you’ll have three different options to define your content groups:

Group By Tracking Code

Grouping by tracking code involves modifying your JavaScript tracking code:


You’ll need to add a line of code to each web page that identifies the Content Group.

Here’s what the code would look like if you defined your first Content Grouping as Accessories and created a content group called Android: youanalytics.js: ga('set', 'contentGroup1', 'Android');

Group Using Extraction

If you group using extraction, then you define your content groups by page or page titles.


This is a regular expression to identify the URL, page title, or screen name of your pages. If you use subdirectories to categorize your product pages, this will be an easy way to assign content.

For example:

Page > /Android/(.*)/ would put each subdirectory of /Android/ into the corresponding Content Group.

Group Using Rule Definitions

With this option, you can use the rules editor to help identify your content.


This method will show you different matching options you can use to define your rules. For example, if you use “Page > contains > /Cases/” all content with /Cases/ in the URL will be added to the Content Group.

You can use any or all of these methods to identify your content. Just know, Analytics will evaluate your content first by the tracking code, then by regular expressions, and lastly by configured rules. If you have more than one rule, these will also be evaluated in order.

Also, setting up Content Grouping won’t help you analyze historical data for these content categories. The Content Groups are only valid once you create them.

Content Grouping Analytics

Once you add Content Grouping as a primary dimension in your Content reports, you can see Content-Grouping statistics.

The names you defined will appear as options from the Primary Dimension>Content Grouping menu.

For this report, Unique Views means the number of sessions in which a page in that group was viewed one or more times. So, if someone visits the page for one of your iPhone cases 5 times in the same session, it would only count as 1 Unique View for the content group.

You can also use Content Grouping in your Behavioral Flow graphs. These help you see the journey visitors take through your content groupings:


Then you can answer questions like, “After visitors look at my Android cases pages, where do they go next? Do they switch to another section or leave the site?”

If you have a higher exit rate for one content group, there could be some user experience problems with these pages that cause people to leave.

Wrapping Up

In this post, I focused on an ecommerce example for content grouping, but webmasters for all sorts of sites can benefit from extra insights with content grouping. Justin Cutroni wrote a great post describing how content grouping works in different use cases, including:

  • Ecommerce
  • Software as a Service
  • Gaming Applications
  • Content Publishers

Check it out to get some inspiration for how you can adapt content grouping for your site.

Do you already use content grouping in Google Analytics? I’d love to hear about your use-case in the comments.

About the Author: Courtney Danyel

Courtney Danyel is a digital marketing and business writer, providing unique and actionable content based on the latest scientific and industry research. Visit to learn more about her work.

Additional Posts

Making Memes Work For Your Online Marketing

The Help-Hub-Hero Approach To Video Marketing

7 Top Tools For Content Creators

In compliance with Ontario’s non-essential business closure our physical offices are closed until further notice. Fortunately our willingness to adopt work from home and the required technology over the past two years has allowed us to continue our operations without impact. For our valued clients and partners you can expect the same great level of service and execution you have become accustomed to.

Many clients/prospects have reached out to us in an effort to introduce new campaigns as quickly as possible. In an effort to help our clients pivot we have increased our campaign build capacity. We are now able to turn new campaigns over in 2-3 business days opposed to the typical 5-7 business day turnaround time. Please note that campaign launch approvals from the vendor side (Google, Bing, Facebook, Instagram etc.) may be delayed as those companies migrate to work from home.

For existing clients please reach out to your account manager with any questions you may have.

For non-clients looking for assistance with new campaigns please Contact Us

Read previous post:
Making Memes Work For Your Online Marketing

In recent years, Internet memes have become very popular. So much so that they have spilled over from the web...Read...