Enable Google Analytics 4 integration
Enable Google Analytics 4 integration
This is for:
DeveloperThis article explains how to set up the Coveo Experimentation Hub to send Google Analytics 4 (GA4) Impression events and shows the structure of these events.
The Coveo Experimentation 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 experience
-
GA4 set up on your site
Features
Similarly to the integration with Google Analytics, the integration with GA4 allows you to send events from an Experimentation 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 Experimentation Hub property to that roll-up property.
Note
The Coveo Experimentation Hub can send events to both GA and GA4, it depends on what versions of GA are set up on your site. |
Enable GA4 integration
You can enable the integration for any invidual experience in your property.
-
Open the side bar and select Experiences.
-
Click the experience you want to enable the integration for.
-
Switch to the Settings tab.
-
Scroll down to the Google Analytics GA4 integration section.
-
Turn on the toggle. The changes are saved automatically.
From now, the integration is active and will send Impression events to GA4. |
When the integration is enabled, the Google Analytics GA4 integration section shows the following information:
-
Experience (shared parameters)
— experience parameters common for all variations of this experience.-
experience_id
-
experience_name
-
-
For each variation, its name followed by these parameters (see Event payload):
-
variation_master_id
-
variation_name
-
is_control
-
Event payload
To find relevant events in GA4, you need to know what exact event data the Experimentation Hub sends to GA4. That data may help you in creating reports and segments in GA4.
Under the hood, the Experimentation Hub checks if the window.gtag()
method is available on the site.
If it’s available, the Experimentation Hub uses it to send the following payload to GA4:
{
"name": "experience_name",
"params": {
"experience_id": "174681",
"experience_name": "Impressions Count Banner 1",
"variation_master_id": "238",
"variation_name": "GA4 Impressions Count Banner 1, 2023",
"is_control": "no",
}
}
The experience’s unique identifier. | |
The human-readable experience name. | |
The variation’s unique identifier. | |
The human-readable variation name. | |
Shows whether it’s a CONTROL variation or not.
Possible values are: yes , no . |