About
Google Analytics 4 (GA4) lets you measure traffic and engagement in Content Hubs. This article explains how to connect your Content Hub to GA4 and validate that GA4 is collecting data.
Content Hubs uses client-side navigation, which means visitors can move between pages without a full page reload. To track these page views, your GA4 web data stream must be configured to track page changes based on browser history events.
The setup in this article tracks activity in your Content Hub. To send player events to GA4, you also need to configure Google Analytics in the player. See Integration settings in the player.
Before you start
Make sure you have a Google Analytics account with a GA4 property and a web data stream for your Content Hub. A web data stream represents your Content Hub website in GA4 and is associated with your Content Hub URL.
If you need to create a GA4 property or web data stream, see Set up Analytics for a website and/or app.
Configure GA4 for Content Hubs
Configure the web data stream
- Sign in to your Google Analytics account.
- Click Admin in the lower-left corner.
- Make sure the GA4 property for your Content Hub is selected at the top of the page.
- Under Data collection and modification, click Data streams.
- Select the web data stream for your Content Hub.
- Under Enhanced measurement, click the gear icon.
- Under Page views, click Show advanced settings.
- Make sure Page changes based on browser history events is selected.
This setting is selected by default for new web data streams. Keep it selected so GA4 can track page views when visitors navigate within your Content Hub without a full page reload.
- Click Save.
- Under Google tag, click View tag instructions.
- Under Install manually, copy the Google tag.
The Google tag contains an external JavaScript URL and JavaScript configuration code. You'll add these to separate fields in the Content Hub configuration.
Configure the Google tag in Content Hubs
- Go to the Configuration Management console.
- Open the Application module.
- In the
headerJSlinksfield, add the URL from thesrcattribute of the first<script>element. For example:https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX - In the
headerJSfield, add the JavaScript from inside the second<script>element. Don't include the opening and closing<script>tags. For example:window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXXX');Replace
G-XXXXXXXXXXwith the Measurement ID from your Google tag. - Confirm that the configuration looks similar to the following:

- Click Save.
Validate the setup
- Open your Content Hub and navigate through a few pages.
- Return to Google Analytics.
- Click Admin in the lower-left corner.
- Make sure the GA4 property for your Content Hub is selected at the top of the page.
- Under Data collection and modification, click Data streams.
- Select the web data stream for your Content Hub.
- Under Google tag, click View tag instructions.
- Click Test installation. Google Analytics confirms when the Google tag is detected on your Content Hub.
- Close the installation instructions and click Reports in the left panel.
- Click Realtime overview and confirm that activity from your Content Hub appears.
- Click Realtime pages.
- Navigate between several pages in your Content Hub without refreshing your browser. Confirm that the different page paths appear in the report. This verifies that GA4 is tracking client-side navigation in your Content Hub.
Track events
Automatically collected events
GA4 automatically collects events that provide information about how visitors interact with your Content Hub. These can include events such as page_view, session_start, user_engagement, and scroll.
Some events are collected automatically, while others depend on the Enhanced Measurement settings configured for your web data stream.
To learn more, see Automatically collected events.
Custom events
Before you create a custom event, check whether GA4 already collects the event automatically or provides a recommended event for the interaction you want to track.
For more information, see:
You can implement custom events using different methods, depending on your Google Analytics configuration. For website measurement, see:
