Notification

G Suite is now Google Workspace: everything your business needs to get work done.

[UA] Google Analytics Content Groups [Legacy]

Use content groups in your Tag Manager configurations
You are viewing a legacy article about Universal Analytics. Learn more about Google Analytics 4 replacing Universal Analytics.
Note: This article is about Universal Analytics (UA). Starting July 1, 2023, standard UA properties will stop processing data (July 1, 2024 for UA 360 properties). If you are still using UA, make the switch to Google Analytics 4 (GA4).

Google Analytics Content Groups enable the ability to organize content in your Google Analytics reports into logical structures. For example: Instead of viewing data for your ecommerce site by individual pages, you can view data for "Bicycles," and create additional subgroups for "Road Bikes," "Mountain Bikes," and "Bike Accessories." You can configure Tag Manager to send Content Group data to Google Analytics.

Top-level content groups are defined within Google Analytics:

  1. Create a top-level content group. In Google Analytics, navigate to Admin and then View and then Content Grouping.
  2. Click + New Content Grouping.
  3. Provide a name for the Content Group (e.g. "Road Bikes") and click Enable Tracking Code.
  4. Select an index number (1-5). This number will be associated with the name you provided. You will use this number when you create your tag in Google Tag Manager.
  5. Click Done and Save.

Next, go to Tag Manager and add Content Groups to your existing Universal Analytics pageview tag.

  1. Under More Settings, expand Content Groups.
  2. Click the Add Content Group button to add a new row.
  3. For the Index field, enter the index number of the top level Content Group that you recorded earlier.
  4. Under Content Group, enter a sub-group name (e.g. "Mountain Bikes", or the name of a variable).

If you enter a string in the Content Group field (for example, "Mountain Bikes"), modify the triggers so that the tag fires only on the pages that belong to the "Mountain Bikes" Content Group. In this case, set up a pageview tag for each Content Group.

To measure content groups with a single tag, create a Lookup Table variable and enter the name of this variable in the Content Group field.

This example Lookup Table variable leverages information in the URL to assist with the placement of items into Content Groups:

  1. Navigate to Variables and then User-Defined Variables.
  2. Click New.
  3. Click Variable Configuration and select Lookup Table.
  4. Set the Input Variable to {{url path}}.
  5. Add your lookup conditions: Click + Add Row and enter input and output values, e.g.:
    Input Output
    /road Road Bikes
    /mtb Mountain Bikes
    /helmets Accessories
    /gloves Accessories
  6. Click Create Variable.

This variable can now be applied to a Content Group within a single Universal Analytics pageview tag that fires on all pages. To apply this variable to your existing Google Analytics pageview tag

  1. Open the tag for editing and navigate to More Settings and then Content Groups.
  2. Enter the name of the Lookup Table variable that you created earlier into the Content Group field:
Index Content Group
1 {{Content Group}}

After the container has been published, Content-Group data will begin to appear in your Google Analytics reports.

For more precise control of Tag Manager variable data, work with a developer to implement a data layer.

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
1048573762810379246
true
Search Help Center
true
true
true
true
true
102259
false
false