Details
Integration Type | Dynamic Variable Prefix |
AB Testing | AB_ABT_ |
Implementation
You have 2 options to install this integration depending on how you run your AB tests with AB Tasty
- If you run your tests client-side, please see the section AB Tasty (Client Side) below
- If you run your tests server-side, please see the section AB Tasty Flagship (Server Side) below
AB Tasty (Client Side)
Please go to the section How to request an integration to see the instructions to enable the client side integration. You can then go to the Verifying it works section below.
AB Tasty Flagship (Server Side)
Note this section is ONLY for AB Tasty Flagship (server side tests) not for the client side tests. Client side tests must be enabled above.
You would need to use one of the SDKs mentioned here.
You can use this document as an example.
Depending on which SDK you use, you would simply need to add this Javascript code into the server side logic you have by using the SDK to obtain the Campaign Names and Variation Names then pass those to this code below.
/* *Name: AB Tasty Flagship Server Side Tests CS Integration Start *Version: 1.1.0 */ (function () { var version = "1.1.0"; window._uxa = window._uxa || []; var tvp = "AB_ABT_"; function callback() { if (!disableCallback) { disableCallback = true; if (window.CS_CONF) { CS_CONF.integrations = CS_CONF.integrations || []; CS_CONF.integrations.push("AB Tasty - Flagship - v" + version); } } } var disableCallback = false; _uxa.push(["afterPageView", callback]); function sendToCS(csKey, csValue) { csKey = tvp + csKey; _uxa.push([ "trackDynamicVariable", { key: csKey, value: csValue, }, ]); } //Add whatever logic you want here in order to get the values of Flagship_campaignName and Flagship_variationName and then replace it in the vars below so that it is dynamically set. //In addition, if there are multiple tests on the same page then you need to execute the 3 lines below for each test. So run it in a loop forEach campaign. var campaignName = Flagship_campaignName; var variationName = Flagship_variationName; sendToCS(campaignName, variationName.toString()); })(); //AB Tasty Flagship Server Side Tests CS Integration End
The only part that you need to tweak or add your own code logic to is this part:
Replace Flagship_campaignName and Flagship_variationName with the variables you generate in your code and dynamically add them there.
Verifying it works
You can check that the data is being sent by using the Chrome extension, it should look like the below:
Once completed you will be able to see the results in Contentsquare like this:
Dynamic Variable Possibilities
Var Key | Var Type |
AB_ABT_Campaign Name
|
Text
|