RuffRuff App RuffRuff App by Tsun

[GA4] How to Set Up Content group | Explanation of Utilization in Looker Studio

[GA4] How to Set Up Content group | Explanation of Utilization in Looker Studio

GA4's content groups are a useful feature that allows you to categorize pages on your site by type or purpose and view metrics for each group. To utilize this feature, certain settings need to be configured. This article provides a detailed explanation of the various methods for creating content groups and how to visualize them in Looker Studio.

What is a Content Group in GA4?

A content group in GA4 is a feature that allows you to categorize pages on your site by type. By using this feature, you can organize content based on specific categories or themes and analyze the data accordingly. Instead of viewing metrics on a per-page basis, you can view metrics by group, which allows you to see which content is effective for which users and which content has high engagement.

Related Articles : Create content groups

How to create a content group 

There are several methods to create content groups, each with its own advantages and disadvantages.

  Advantages Disadvantages
Set up in GA4 Easy to set up ・Not applicable to past data
・Settings need to be configured for each content group
Set up in GTM ・Complex conditions can be specified.
・Bulk settings can be applied.
・Not applicable to past data
Set up in Looker Studio ・Can be applied to past data
・Can be configured in bulk
・Session and user counts are not unique within the content group.

Let’s discuss the disadvantages of using settings in Looker Studio.

For example, let’s say you want to create a content group for pages that include /123/ in the directory.

If the access data shows that:

https://function.com/abc/123/x has 10 pageviews and 8 users
https://function.com/abc/123/y has 5 pageviews and 5 users
The total pageviews for the content group containing /123/ would appropriately be 15 by adding the two. However, the total number of users may not simply add up to 13. This discrepancy occurs when the same user has accessed both pages. If 2 users visited both pages, the content group for /123/ would have 15 pageviews and 11 users. However, in Looker Studio, the session and user counts for the content group are not de-duplicated and are simply displayed as the sum, which would be 13 in this case. Therefore, you should be cautious about how and when to use these metrics.

As for the best practices:

If you want to compare the session or user numbers for each group, use content groups set up in GA4 or Google Tag Manager.
If you want to see pageviews or display graphs/tables filtered by specific groups, it is better to use Looker Studio settings.
While there are disadvantages to using settings in Looker Studio, a significant advantage is that it can be applied to past data. Choose the optimal method based on your current situation and goals.

Next, I will explain the detailed setup methods for each. In this case, we will create three types of content groups for a site: category pages for products, product pages, and blog pages.

How to Create in GA4

First, select 'Events' from the management menu.

ga4-content-group-events

 (Quote:GA4)

Next, select 'Modify event'

ga4-content-group-modify-event

 (Quote:GA4)

 Select 'Create' and configure it as follows.

ga4-content-group-create

 (Quote:GA4)

① Assign a name. Choose a name that clearly indicates what the setting is for future reference.

② Specify the conditions that are common to the pages you want to classify. In this case, we'll set up a content group for pages that include "/collections/" in the URL.

③ Set the parameters. Make sure to use "content_group" as the parameter name. This will allow the content group to be utilized in reports within the GA4 management interface without requiring additional settings.

Once all necessary inputs are complete, click "Create." This will create a content group for product categories. Following the same process, you can also create content groups for product pages and blogs.

ga4-content-group-products
 (Quote:GA4)
ga4-content-group-blogs

 (Quote:GA4)

The setup is now complete. When creating in the GA4 admin panel, you will need to configure each content group classification individually.

How to Create in GTM

 Next, I will explain how to create it using Google Tag Manager. First, create a variable from the Variables menu.

ga4-content-group-gtm-variables

(Quote:GTM)

We will set it up as follows.

ga4-content-group-gtm-variables-setting

 (Quote:GTM)

 

  1. Give it a name of your choice; make sure it's something that will help you understand what the setting is for when you look at it later.

  2. This time, we will classify the content group by URL, so specify the Page Path.

  3. Set up the group you want to create using regular expressions.

  4. Check the box to set a default value and specify what to classify when the conditions are not met. In this case, we have it classified as "other."

Once the setup is complete, click the "Save" button in the upper right corner. Next, add the variable you created as a parameter to the GA4 tracking tag. Select the GA4 tag from the tags menu and configure it as follows.

ga4-content-group-gtm-tag-setting

 (Quote:GTM)

Make sure to name the configuration parameter item as "content_group." Set the value to the variable you created earlier. Once the settings are complete, click "Save" in the upper right corner. This completes the setup. Unlike in the GA4 management interface, where each setting needs to be configured individually, Google Tag Manager allows for more efficient configuration, especially when dealing with a large number of groups.

When you begin actual measurement, don't forget to publish the changes in Google Tag Manager.

How to Create in Looker Studio

Finally, we will explain how to create it using the CASE function in Looker Studio's calculated fields. For more details on calculated fields and the CASE function, please refer to [Looker Studio] How to Use the CASE Function and Examples | Calculated Fields.

Set up the calculated fields as follows:

ga4-content-group-looker-studio-calculated-fields

 (Quote:Looker Studio)

 

  1. Give it an appropriate name, so you can easily identify the settings later.

  2. Create a content group using page paths, similar to how it is done in the GA4 admin panel or Google Tag Manager.

CASE
WHEN CONTAINS_TEXT(Page Path and Screen Class, "/collections/") THEN "category"
WHEN CONTAINS_TEXT(Page Path and Screen Class, "/products/") THEN "products"
WHEN CONTAINS_TEXT(Page Path and Screen Class, "/blogs/") THEN "blogs"
ELSE "other"
END

  1. Once the configuration is complete, click "Save" at the bottom right corner. The setup is now finished.

How to Utilize Looker Studio Reports

From here, we will visualize the content groups we created using Looker Studio reports.

When set up with GA4 or Google Tag Manager

By using the default "Content Group" dimension, you can visualize the metrics for each content group. For example, you can create a table showing the number of impressions, sessions, and active users for each content group. 

ga4-content-group-looker-studio-visualize-ga4

 (Quote:Looker Studio) 

When set up with calculated field in Looker Studio

Since the calculated field you created is now available as a dimension, you can set it as follows. Visualize the number of impressions for each content group.

ga4-content-group-looker-studio-report

 (Quote:Looker Studio)

By adding a dropdown list to the report from "Add Control" in the top menu, you can filter tables on each page to view data specific to any content group.

Although page filtering with a dropdown list can also be achieved using other dimensions such as page titles or page paths, using content groups allows you to create categories with any string, enabling the creation of an intuitively understandable list.

ga4-content-group-looker-studio-report-filter

 (Quote:Looker Studio)

The above is how to utilize the content groups you set up in Looker Studio. Please try to use and differentiate between the creation methods of each content group according to your objectives. 

Back to blog

Featured collection