Enable Google Analytics 4 (GA4) integration
Enable Google Analytics 4 (GA4) integration
This article explains how to set up Coveo Experience Hub to send Google Analytics 4 (GA4) View and clickthrough events, and shows the structure of these events.
The Coveo Experience Hub doesn’t send events to Google Universal Analytics (Google UA) and Google Analytics 4 (GA4) if any or both of the following are true:
|
Prerequisites
Make sure that you have:
-
a GA4 account and a property within it
-
at least one active Placement
-
an active campaign within that Placement
Features
Similarly to the integration with Google Analytics, the integration with GA4 allows you to send events from an Experience Hub property to GA4.
Also, this integration lets you use the roll-up property in GA4 for analysis. This means that in GA4, you can have one roll-up property for many of your brands and send all events from your Experience Hub property to that roll-up property.
Note
This is a property-wide setting that you can’t configure at the individual campaign level. If you turn on the integration, the Experience Hub will send View and Clickthrough events for all the experiences in your campaigns. |
Enable GA4 integration
To enable GA4 in your property:
-
Open the side bar and select Property settings.
-
Switch to the Integrations tab.
-
In the Google Analytics 4 card, turn on the toggle.
If that’s the first time you enable the integration, the modal window will open automatically.
NoteIf you have already set up the integration in the past, you need to click the Edit button below the Google Analytics 4 card to open a modal window.
-
In the modal window, paste your Measurement ID and API secret in the corresponding fields.
-
Click the Save button to save the credentials and close the modal window.
From now on, the integration is active and will send View and Clickthrough events to GA4.
To test if the integration works, use the Send test event button.
Event parameters sent to GA4
To find relevant events in GA4, you need to know what exact event data the Experience Hub sends to GA4.
-
In the left menu, select Campaigns.
-
Select the campaign whose events you would like to find in GA4.
-
On the campaign results page, switch to the Integrations tab.
Here, you can see the event parameters that the Experience Hub sends to your GA4 account. The data displayed in this tab may help you in creating reports and segments in GA4.
Parameter | Description |
---|---|
|
The campaign’s unique identifier. Example: |
|
The human-readable campaign name. Example: |
|
Shows if the event came from the campaign previews. Possible values are:
Example: |
|
The Placement’s unique identifier. Example: |
|
The human-readable Placement name. Example: |
|
Possible values are:
|
Under the hood, the Experience Hub sends the following payload to GA4’s endpoint https://www.google-analytics.com/mp/collect
:
{
"client_id": "X",
"events": [
{
"name": "cmh_campaign_view",
"params": {
"campaign_id": "abc123-def456"
"campaign_name": "Recommendations test for North-American users",
"is_preview": "1",
"placement_id": "8IJM-mEsQKodgvBbb1S_wg",
"placement_name": "you-may-like carousel",
"variant_type": "CONTROL"
}
}
]
}
Specifies the event type.
Possible values are: cmh_campaign_view , cmh_campaign_clickthrough . |