OVERVIEW HOW IT WORKS

 

Overview

AB Tasty is the fastest-growing provider of AI-powered experimentation, personalization and product optimization solutions, helping businesses drive more conversions and revenue on all their digital assets. We provide marketing, product and technical teams with an easy-to-use customer experience optimization platform, allowing them to turn website or mobile visitors into customers, subscribers or leads, while delivering outstanding user experiences. AB Tasty’s customer list includes Ashley Furniture, Kiehl’s, Sephora, USA Today, YSL Beauty, as well as more than 900 global enterprises. To learn more, please visit www.abtasty.com

 

 

 

How it Works

AB Tasty is joining forces with FullStory to deepen the analytics about how users interact with AB Tasty experiments and create ideas on what tests to try next on AB Tasty. Together, the full digital experience will be explained from experiment to the reason why. The integration will begin by focusing on FullStory’s Session Replay feature. By adding the FullStory snippet and custom integration script to your site, you will be able to search AB Tasty campaigns and variations within FullStory’s Session Replays by choosing custom events. FullStory collects the following information related to AB Tasty: - Campaign’s Name - Campaign’s ID - Variation’s Name - Variation’s ID Your entire DOM and all assets, mouse movements, customer actions and more will be captured without the need to manually tag events.

 

 

Instructions

1. In your FullStory Account, go to Settings > FullStory Setup and copy your recording snippet 2. In your AB Tasty Account, go to Settings > Global code. Paste the FullStory recording snippet in the code editor.


3. Copy the Custom Integration script (found at the bottom of this page) and paste it below the recording snippet in the Global code editor. 4. Now your Global code Editor should look like the image attached. 5. Click on Save and refresh your tag by clicking on this button at the right-left of AB Tasty window Once the instructions above have been completed, AB Tasty will start to send the Campaign’s name and ID, as well as the Variation’s name and ID to FullStory as Custom Event. These custom events will be sent at each page load. It will also work if the visitor is exposed to more than one campaign. For example, if a visitor is exposed to 3 experiments on a page, then we will send 3 Custom Events. Please Note: If you added FullStory recording snippet with using a Tag Manager or your CMS, you just need to add the Custom Integration script in the Global code editor.


In your FullStory account click on Create a new Segment, and choose Custom Events > ABTasty Experiment.


If you want to filter session replays on a given experiment, use the attributes campaign_name or campaign_id. To filter on Variation, use variation_name and variation_id Please Note : On AB Tasty, the Original variation (control group) always has 0 for its variation ID.


In the Session Playback view, you can see the detail of the AB Tasty Experiment data in the event log sidebar.


Custom Integration Script

/*****************************************/

/** Link AB Tasty to a third party tool **/

/** Custom integration **/

/*****************************************/

(function() {

const sendMasterOnMP = false; // Send the master ID and the master variation of the multipage campaigns

const cleverForPerso = false; // Be clever than our tool and send the master ID and master name for the persos (and don't send the variation)

const listenLaterCampaigns = true; // Send campaigns which are in AJAX mode or using targeting by events

const sendBySession = false; // Send the datas of the campaig only one time by user's session

var isFSReady = false;

window['_fs_ready'] = function() {

isFSReady = true;

};


// Function to wait the Traker function before run the code

function waitTool () {

return isFSReady;

}

// Function to send the tracking

// campaignInfos is construct like this : {testID: THE_TEST_ID, testName: THE_TEST_NAME, variationID: THE_VARIATION_ID, variationName: THE_VARIATION_NAME}

function sendEvent(campaignID, campaignInfos, isLastCampaign) {

const FSEventPayload = {

campaign_id_int: campaignInfos.testID,

campaign_name_str : campaignInfos.testName,

variation_id_int: campaignInfos.variationID,

variation_name_str: campaignInfos.variationName

};

FS.event('ABTasty Experiment', FSEventPayload, 'ABTasty');

return true;

}

 

/*********************************/

/** Don't change the code below **/

/*********************************/

function waitData(condition, callback) {

condition()

? callback()

: setTimeout(function() {

waitData(condition, callback);

}, 500);

}

function start() {

const AB = window.ABTasty;

const isTagV3 = function() {

return typeof AB.getAccountSettings === "function";

};

const getAccountSettings = isTagV3()

? AB.getAccountSettings

: function() {

return AB.accountSettings;

};

const getParentDatas = function(id) {

return isTagV3()

? AB.accountData.tests[id]

: AB.tests.filter(function(el) {

return el.datas.id == id;

})[0].datas;

};

const getParentId = function(campaignDatas) {

return isTagV3() ? campaignDatas.parentID : campaignDatas.masterTest;

};

function getABTastyCookie() {

const abCookieDatas =

getAccountSettings().storageMode == "local"

? ["ABTasty", localStorage.getItem("ABTasty")]

: document.cookie.match(/.*ABTasty=([^;]+).*/);

if (abCookieDatas && abCookieDatas[1]) {

const abCookie = JSON.parse(

'{"' +

decodeURIComponent(abCookieDatas[1])

.replace(/&/g, '","')

.replace(/=/g, '":"') +

'"}'

);

abCookie.th = abCookie.th.split("_").map(function(el) {

return el.split(".");

});

return abCookie;

}

return null;

}

let isNewSession = false;

if (!isTagV3()) {

const sessionNumber = getABTastyCookie().ns;

const navigationDatas = JSON.parse(localStorage.getItem("ABTastyData"));

isNewSession = navigationDatas["VisitedPages"]

? navigationDatas["VisitedPages"].filter(function(el) {

return el.visite == sessionNumber;

}).length < 2

: true;

} else {

const abTastySessionCookie = new HELPERS.ABTastySessionCookie();

isNewSession = abTastySessionCookie.isNewSession;

}

let alreadyTreat = [];

const alreadySend =

!isNewSession && localStorage.getItem("ab_campaignsAlreadySend")

? localStorage.getItem("ab_campaignsAlreadySend").split(",")

: [];

let currentCampaigns = [];

function getCampaignDatas(campaignID) {

const campaignResults = AB.getTestsOnPage()[campaignID];

const campaignDatas = campaignResults.testDatas;

const parentDatas =

getParentId(campaignDatas) !== 0

? getParentDatas(getParentId(campaignDatas))

: null;

const wantedDatas = {

testID: Number(campaignID),

testName: campaignResults.name,

variationID: Number(campaignResults.variationID),

variationName: campaignResults.variationName

};

if (

parentDatas !== null &&

((sendMasterOnMP && parentDatas.type === "multipage") || // multipage management

(cleverForPerso && parentDatas.type === "mastersegment")) // personnalization management

) {

wantedDatas.testID = Number(parentDatas.id);

wantedDatas.testName = parentDatas.name;

if (parentDatas.type === "multipage") {

const masterVariation = Object.keys(parentDatas.variations).filter(

function(el) {

return (

parentDatas.variations[el].name ===

campaignResults.variationName

);

}

);

wantedDatas.variationID =

masterVariation && masterVariation.length > 0

? Number(parentDatas.variations[masterVariation[0]].id)

: wantedDatas.variationID;

} else {

wantedDatas.variationID = Number(campaignID);

wantedDatas.variationName = campaignResults.name;

}

}

return wantedDatas;

}

function sendCurrentCampaigns() {

currentCampaigns = currentCampaigns.concat(

Object.keys(AB.getTestsOnPage()).filter(function(el) {

return currentCampaigns.indexOf(el) < 0;

})

);

currentCampaigns.forEach(function(el, index) {

if (alreadyTreat.indexOf(String(el)) > -1) return;

alreadyTreat.push(String(el));

const datasToSend = getCampaignDatas(el);

if (isNaN(datasToSend.variationID) || typeof datasToSend.variationName !== 'string') {

alreadyTreat = alreadyTreat.filter(function (id) { return id !== el });

return;

}

if (alreadySend.indexOf(String(datasToSend.testID)) > -1) return;

sendEvent(el, datasToSend, index == currentCampaigns.length - 1);

alreadySend.push(String(datasToSend.testID));

sendBySession &&

localStorage.setItem("ab_campaignsAlreadySend", alreadySend);

});

return true;

}

function hasPendingCampaigns() {

return (

Object.keys(AB.results).filter(function(el) {

return AB.results[el].status === "pending";

}).length > 0

);

}

function sendNewCampaigns() {

if (!listenLaterCampaigns) return true;

if (hasPendingCampaigns()) {

var waitNewCampaigns = setInterval(function() {

sendCurrentCampaigns();

if (!hasPendingCampaigns()) clearInterval(waitNewCampaigns);

}, 800);

}

var oldABTastyStartTest = window.ABTastyStartTest;

var newABTastyStartTest = function(testID, variationID) {

oldABTastyStartTest(testID, variationID);

sendCurrentCampaigns();

};

window.ABTastyStartTest = newABTastyStartTest;

return true;

}

sendCurrentCampaigns() && sendNewCampaigns();

const beforeResend = setInterval(sendCurrentCampaigns, 250);

setTimeout(function() { clearInterval(beforeResend); }, 1500);

}

function waitToStart() {

return (

waitTool() &&

(typeof ABTasty !== "undefined" &&

typeof ABTasty.results !== "undefined" &&

(document.cookie.indexOf("ABTasty=") > -1 ||

localStorage.getItem("ABTasty") != null))

);

}

waitData(waitToStart, start);

})();

/*****************************************/

/** End Custom integration **/

/*****************************************/


 

 

Built by: AB Tasty

Setup: Manual 

Support: techpartners@abtasty.com 

Version:

Contact