Enable Google Universal Analytics integration
Enable Google Universal Analytics integration
This is for:
Developer
Google Universal Analytics is subject to deprecation in 2023. |
This article explains how to set up Coveo Experimentation Hub to send events to Google Universal Analytics (Google UA).
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:
|
Once integrated, the Experimentation Hub will send experience data automatically and seamlessly to your Google UA dashboard, which you can then use to:
-
Report on multiple metrics outside the goals measured by the Experimentation Hub
-
Track Google UA data for the experience control and any variations
-
Filter Google UA data by visitors that were served an experience and those that were not
Note
When a visitor is served an experience, the Experimentation Hub will send a single custom event to Google UA and, for tags implemented via Google Tag Manager, a single GTM event. These events are only sent once per session when the visitor is first served the experience. |
These events are only sent for published experiences. |
Get started
To send experience data to Google UA, you first need to enable the Google UA integration for an experience.
Select Experiences from the side menu. Select your experience to open it and navigate to the Settings tab.
At the bottom of the page, select the Google Analytics integration toggle to enable it:
You can find more information about enabling Google UA integration in Enabling Google Analytics Integration.
Set up Google UA
Once you have enabled the Google UA integration for an experience, you must set up Google UA to receive data from the Experimentation Hub and process it into a standard format.
How you do this depends on how you have implemented the Google UA tag on your site.
Hard-coded Google UA tag
If the tag has been hardcoded, you only need to set up a segment in Google UA and pass the experience Event action Id and Event Label Id as advanced conditions.
See Creating Segments in Google Analytics for more information.
Tag implemented via Google Tag Manager (GTM)
If the tag has been implemented via GTM, you’ll need to set up the trigger, variable, and tag in GTM.
See Setting up GTM to send data to Google Analytics for more information.
Further information
How is data passed to Google UA?
When a visitor is served an experience, either the control or a variation, the Experimentation Hub will send a single custom event to Google UA and additionally, a single GTM event. This approach ensures that the experience data is sent to Google UA irrespective of how the Google UA tag has been implemented–hard-coded, or via GTM. It also allows us to track the serving of an experience as an event.
Following the example experience used in our other Google UA integration articles, the following examples show the JavaScript generated by the custom event that is sent to Google UA and the event that is sent to GTM:
Example Google UA event:
ga('send', {
hitType: 'event',
eventLabel: 501310,
eventAction: 89861,
nonInteraction: true
})
Note
The custom event uses a |
Example GTM event:
{
event: 'qubit.experience',
qubitExperimentId: 89861,
qubitVariationMasterId: 501310
}
Bounce rate
By specifying
nonInteraction:true
we can ensure that the event is sent as a non-interaction event and will not impact the bounce rate.