Integrating with Adobe
This document outlines what is required to send test data into Adobe analytics. This is a push integration only meaning it is sending data to Adobe not pulling data from Adobe into WTO.
Relevant Adobe guide - https://docs.adobe.com/content/help/en/analytics/implementation/vars/functions/tl-method.html
1. Tag Snippet
Add the following snippet to the preinit of your tag.
/*
ADOBE ANALYTICS TRACKING
*/
WT.addEventHandler('pageview', function (e) {
try {
var evar = null;
var str = e.target.z7715.process.body.postScript && e.target.z7715.process.body.postScript.match(/^(\/\/|\/\*).*evar(\d+)/i);
if (str && str[0]) {
str = str[0];
str = str.match(/evar(\d+)/i)[1];
evar = str;
}
if (!evar && window.WTOTests && window.WTOTests[e.target.params.testAlias]) {
var me = window.WTOTests[e.target.params.testAlias];
if (me.Config.adobe && me.Config.adobe.match(/\d+/i)) {
evar = me.Config.adobe.match(/\d+/i)[0];
}
}
var testAlias = e.target.params.testAlias;
var testID = e.target.params.r_runID;
var variationID = e.target.params.r_experimentID || e.target.params.r_personalizedID || false;
if (evar && window.s_c_il && typeof window.s_objectID === 'number' && s_c_il[s_objectID] && variationID) {
var projectDetails = "project_alias: " + testAlias + ", test_name: " + testID + ", experiment_name: " + variationID;
WT.helpers.bdebug.log('WTO Adobe(evar' + evar + '): ', projectDetails);
s_c_il[s_objectID]['eVar' + evar] = projectDetails;
s_c_il[s_objectID].tl();
}
} catch (err) { }
});
2. How to Track
Once the tag snippet has been added, you will need to declare an evar number in your test to be tracked.
This can be done in one of two ways:
1, With a comment at the top of the post render:
2, If using the OBF in the Config object under the parameter abobe:
3. How it works
The script snippet added to the tags preinit will:
take the number declared in the tests post render and set the evar with test details.
invoke the adobe tracking call .tl();
You should then be able to see these details in adobe analytics:
"project_alias: " + testAlias + ", test_name: " + testID + ", experiment_name: " + variationID;