Skip to content

GA4 Content Groups: Verify the Label on Two Page Templates

Label two page templates with GA4 content_group, inspect the page_view for each, and verify the built-in dimension in reporting.

Two distinct paper layouts each with its own small label
Jack Lee
2 Min Read
Share
On This Page

GA4 content groups help you report on pages with the same role. Before you compare the group totals, open two pages and check that each page view actually sends the intended label.

Choose a stable label for each template

Suppose an air-conditioning business in Johor Bahru publishes maintenance guides and bookable service pages. The two page templates serve different purposes. Use the template to choose one label when the page is viewed.

TemplatePublic path in the exampleGroup value
Maintenance guide/guides/clean-aircon-filter/guide
Service page/services/aircon-servicing/service

Use a short stable label that can be shared across several pages. Store the mapping so another editor can check it after a template change.

Send the label with the page view

Set content_group for the current page before its page view is sent. If the site uses the Google tag directly, add this property to the existing configuration object for the intended web stream, with the label from the current template:

{
  content_group: 'guide'
}

In GTM, a variable that returns the label for the current page can supply the same parameter. Update the existing page-view setup. Adding a second page view to attach the label can duplicate counts.

Test two pages and find the reporting dimension

  1. Open a debug session for the target property and open the guide. In DebugView, inspect its page_view and check page_location and content_group.
  2. Visit the service page and inspect its own page view. It should show the service URL and the service label. If it still shows the guide label, check which variable the service template uses and whether a previous page's value is reused during navigation.
  3. Once the events are available in reporting, select Content group in Pages and screens or use the dimension in an exploration. Check the report for the days when the label was sent.

If you cannot see the event, start with the DebugView troubleshooting guide.

Frequently asked questions

Do I have to register a custom dimension for the first group?

No. GA4 has a built-in Content group dimension for content_group. For separate grouping parameters, see the custom dimensions guide.

Why does the report show (not set)?

Check the exact page view in DebugView. If the label is absent, fix the page's template rule. If the label is present, check the report's property, dates and filters before changing the implementation.

Can I send two group labels for the same page?

The built-in parameter takes one string. Choose a consistent label for it. If you need another way to group pages, use another parameter and configure that dimension separately.

Share This Article