Generic A/B Testing
Generic A/B testing allows you to differentiate for URLs sharing the same URL but with different layouts/views and then configure the different layouts as variations. This can be used for various split testing tools that are not included in DXA's standard integrations.
Enabling the generic A/B testing data connector
On the navigation bar, go to Connect > Data Connectors > Configure Data Connectors > Split Testing > Generic A/B Testing.
Under Generic A/B Testing, select Generic A/B Testing Enabled.
The generic A/B testing data connector settings appear.
Click Save.
Generic A/B testing data connector is enabled. See the sections below to implement generic A/B testing.
Implementing generic A/B testing
Option 1
if (window.decibelInsight) {
decibelInsight('ready', function () {
decibelInsight('sendIntegrationData', 'GenericIntegration', {id: 12345, name: 'Variation 1'});
});
}
if (window.decibelInsight) {
decibelInsight('ready', function () {
decibelInsight('sendIntegrationData', 'GenericIntegration', {id: 12345, name: 'New Homepage Original'});
});
}
if (window.decibelInsight) {
decibelInsight('ready', function () {
decibelInsight('sendIntegrationData', 'GenericIntegration', {id: 12346, name: 'New Homepage Variation'});
});
}
This will then allow DXA to collect these variations independently and recognize these as different variations.
Option 2
if (conditionName === true) {
decibelInsight('sendIntegrationData', 'GenericIntegration', {id: 12345, name: 'Variation 1'});
}
The "if" statement would be replaced to only fire on pages with a variation, while "id" and "name" will need to collect the information from a variable, otherwise DXA will collect every variation as the same ID and name.
Trigger Variation Javascript
The Trigger Variation Javascript box allows you to input JavaScript that will trigger the particular variation in heatmaps, if this is available with your selected A/B testing provider. Simply input the required JavaScript here that allows for variations to be triggered when visiting the particular page. This will then "force" the particular variation that you are segmenting by in heatmaps.
If you have this JavaScript added, you can simply create a segment with the selected variation as a filter, then in heatmaps browse to the page that contains the variation. You can then filter this page by the segment that contains the respective variation and this will trigger the variation to display on that page.
Using generic A/B testing variations
Upon collecting generic A/B testing variations, you can begin to use these by creating segments based on them.
When adding filters to a segment, go to Integrations > Generic A/B testing variation and use the Please select ... box to search for a variation.
You can then use the segment to filter sessions, heatmaps, forms, and other DXA features based on visitors who have viewed that particular variation.