Jump to Table of Contents

AB Tasty Integration

This article introduces Infinity's integration with AB Tasty and how to configure it.

What is AB Tasty

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.

How does the AB Tasty integration work?

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.

Creating an AB Tasty integration

Setting up your AB Tasty integration is a simple process with two steps:

  1. Adding the JavaScript
  2. 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

AB Tasty JS Generator.png

  • 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]]);
<!-- 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
(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);
<!-- 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.

Configuring your AB Tasty integration

Step 2 - Configuring the Integration in Infinity

  • Log in to the Infinity Portal, navigate to the Admin section, and select Integrations.
  • At the top of the list of your integrations, select Add Integration, and choose AB Tasty from the drop down. Please note that this is a chargeable integration, additional charges will apply.

AB Tasty Config.png

  • First you need to give your integration a name. It is called AB Tasty by default but you can edit it. Choose something that you'll easily be able to identify later.
  • Next enter your Event Name. Choose something you can easily identify in the AB Tasty platform.
  • We will pass all calls into AB Tasty by default, but this can be changed as required using the options in What do you want to send. You may choose to only send calls that meet a goal, for example.
  • Conversion events should be visible within AB Tasty shortly afterwards, but this could take a few hours.

Viewing the Data in AB Tasty

  • Viewing the data in AB Tasty is quick and easy.
  • Log in to AB Tasty at https://app.abtasty.com/login?lang=en.
  • Locate the experiment you want to look at and click on the report icon (highlighted in yellow in the image below)

AB Tasty Interface 01.png

  • This will open the report suite for your experiment.

AB Tasty Interface 02.png

  • Locate the Event that you added in the Infinity interface and click to expand it and view the report data
Please login to rate this article
  1. Getting Started
  2. Enhancing your Installation
  3. Frequently asked questions
  4. Call Management
  5. Number Management
  6. Infinity API