AB Tasty is one of the world’s biggest and most powerful A/B and multipage experimentation platforms. Infinity’s integration with AB Tasty lets you conduct experiments and see the impact on phone calls, giving a more complete view of the impact site changes have on phone traffic.
When an end user is shown a page as part of an AB Tasty experiment, Infinity capture details of which variant they were shown, and the test and campaign it belongs to.
When that end user subsequently makes a phone call, you can record that call as an offline conversion and pass that into AB Tasty, so you can understand the impact of your tests on phone traffic.
Setting up your AB Tasty integration is a simple process with two steps:
- Adding the JavaScript
- Configuring the Integration in Infinity
The first step is to update the Infinity JavaScript snippet on your web pages to include the AB Tasty code. Then you can configure the integration and determine what data you’d like to send into AB Tasty.
Step 1 - Adding the JavaScript
- In order for us to obtain the campaign, test and variation ids, we need to add some AB Tasty-specific code to the Infinity JavaScript on your website, to capture the cookies.
- The code will capture five variables as separate custom variables: A list of tests seen by a user, the customer ID, the current session time stamp, the session number and the visitor ID.
- To update the JavaScript snippet, Log in to the Infinity Portal, navigate to the Admin section, select Tracking Settings and JavaScript.
- Select the AB Tasty integration using the checkbox in Step 1 of the JavaScript generator. This will add the AB Tasty script to the Infinity code, an example is shown below
- This will add the code needed for the AB Tasty integration into the code generator box. Then simply copy and paste the updated code onto your website pages, you can click copy to clipboard in the top right corner of the code generator to help you.
<!-- AB Tasty Integration Method -->
<script type="text/javascript">
function setAbTastyCustomVars() {
var abTastyCookie = _ictt.push(['_getCookies', 'ABTasty']);
if (abTastyCookie[0] && abTastyCookie[0][1]) {
var cookie = abTastyCookie[0][1];
var sn = /ns=(.+?)(&|$)/.exec(cookie);
if (sn !== null) {
_ictt.push(['_setCustomVar', ['abt_sn', sn[1]]]);
}
var th = /th=(.+?)(&|$)/.exec(cookie);
if (th !== null) {
var thValues = [];
var regex = /(^|_)(.+?)\.(.+?)\./g;
while((testValues = regex.exec(th[1])) !== null) {
thValues.push('"' + testValues[2] + '":"' + testValues[3] + '"');
}
if (thValues.length > 0) {
_ictt.push(['_setCustomVar', ['abt_c', '{' + thValues.join(',') + '}']]);
}
}
if (ABTasty.accountSettings && ABTasty.accountSettings.identifier) {
_ictt.push(['_setCustomVar', ['abt_cid', ABTasty.accountSettings.identifier]]);
}
if (ABTasty.visitor && ABTasty.visitor.id) {
_ictt.push(['_setCustomVar', ['abt_vid', ABTasty.visitor.id]]);
}
}
}
</script>
<!-- End AB Tasty Integration Method -->
<!-- Infinity Tracking Code v2.0
Copyright Infinity 2018
www.infinity.co -->
<script type="text/javascript">
var _ictt = _ictt || [];
_ictt.push(['_setIgrp','XXXX']); // Installation ID
_ictt.push(['_enableGAIntegration',{'gua':true,'ga':false}]);
_ictt.push(['_includeExternal',[{'from':'ABTasty','to':'setAbTastyCustomVars'}]]);
_ictt.push(['_enableAutoDiscovery']);
_ictt.push(['_track']);
(function() {
var ict = document.createElement('script'); ict.type = 'text/javascript'; ict.async = true;
ict.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'ict.infinity-tracking.net/js/nas.v1.min.js';
var scr = document.getElementsByTagName('script')[0]; scr.parentNode.insertBefore(ict, scr);
})();
</script>
<!-- Infinity Tracking Code End -->
- The revised code should be placed just before the closing
</head>
tag element within each page of the website as this will allow for the fastest execution.