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 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.
INFO: To help you easily identify the experience control and variation in third-party integrations such as GA, we provide a method, via your prescript, to send a custom label rather than an Id. See our example for details.
To send experience data to Google Analytics, you first need to enable GA integration.
To do this, select the Google Analytics integration toggle:
You can find more information about enabling GA integration in each of the articles covering configuring experiences.
Once you have enabled GA integration for an experience, you must setup GA to receive the data sent by Qubit 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 hard coded, 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 can be sent to GA irrespective of how the GA tag has been implemented. 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: 186039,
eventAction: 1122508,
nonInteraction: true
})
The custom event uses a send
command and hitType event
.
Example GTM event:
{
"event": "qubit.experience",
"qubitExperimentId": 1122508,
"qubitVariationMasterId": 186039
}
By specifying
{
"nonInteraction": true
}
we can ensure that the event is sent as a non-interaction event and will not impact the bounce rate.