We'll cover the steps involved in sending experience event data for your experiences to Google Analytics.
If you are using Google Analytics to track and analyze site data, you can also integrate experience interaction results as an additional touchpoint.
Once integrated, Qubit will send experience data automatically and seamlessly to your GA dashboard, which you can then use to:
INFO: When a visitor is served an experience, Qubit will send a single custom event to GA and, for tags implemented via Google Tag Manager, a single GTM event. These events are only sent once per session when the visitor is served the experience.
WARNING: These events are only sent for published experiences.
To send experience data to Google Analytics, you first need to enable GA 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 GA integration in Enabling Google Analytics Integration.
Once you have enabled GA integration for an experience, you must set up GA to receive Qubit's data and process it into a standard format.
How you do this depends on how you have implemented the GA tag on your site.
If the tag has been hardcoded, you only need to set up a segment in Google Analytics and pass the experience Event action Id and Event Label Id as advanced conditions.
See Creating Segments in Google Analytics for more information.
If the tag has been implemented via GTM, you will need to set up the trigger, variable, and tag in GTM.
See Setting up GTM to send data to Google Analytics for more information.
When a visitor is served an experience, either the control or a variation, Qubit will send a single custom event to Google Analytics and additionally, a single GTM event. This approach ensures that the experience data is sent to GA irrespective of how the GA 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 Analytics integration articles, the following examples show the JavaScript generated by the custom event that is sent to GA and the event that is sent to GTM:
Example GA event:
ga('send', {
hitType: 'event',
eventLabel: 501310,
eventAction: 89861,
nonInteraction: true
})
INFO: The custom event uses a send
command and hitType event
.
Example GTM event:
{
event: 'qubit.experience',
qubitExperimentId: 89861,
qubitVariationMasterId: 501310
}
By specifying
nonInteraction:true
we can ensure that the event is sent as a non-interaction event and will not impact the bounce rate.