This article applies to customers on our Pro and Enterprise plans. Available for Web projects only.
Category: AB Testing
What to expect
This integration will allow you to segment users based on their Interaction Studio campaigns and user groups.
What we collect
Dynamic Variables
Key | Value | Data Type |
AB_EG_{campaignName} | {variationName} : {userGroup} | Text |
Implementation
Implementation Steps
Inside your Interaction Studio (Evergage) platform go to Web then open Site-Wide Javascript
Insert the code below into the code box
/* *Name: Interaction Studio (Formerly Evergage) CS Integration *Version: 2.0.0 */ var version = "2.0.0"; var tvp = "AB_EG_"; function sendToCS(csKey, csValue) { csKey = tvp + csKey; window._uxa.push([ "trackDynamicVariable", { key: csKey, value: csValue, }, ]); } function callback(context) { if (!disableCallback) { disableCallback = true; if (window.CS_CONF) { window.CS_CONF.integrations = CS_CONF.integrations || []; window.CS_CONF.integrations.push("Evergage - v" + version); } } } var disableCallback = false; window._uxa = window._uxa || []; window._uxa.push(["afterPageView", callback]); document.addEventListener(SalesforceInteractions.mcis.CustomEvents.OnStatSend, (event) => { if (event && event.detail && event.detail.campaignResponse) { var campaignName = event.detail.campaignResponse.campaignName || event.detail.campaignResponse.campaignId; var variationName = event.detail.campaignResponse.experienceName || event.detail.campaignResponse.experienceId; var userGroup = event.detail.campaignResponse.userGroup; if (campaignName && variationName && userGroup) { sendToCS(campaignName, variationName + " : " + userGroup); } } }); //Interaction Studio (Formerly Evergage) CS Integration End
Verifying it works
You can use the Contentsquare Tracking Setup Assistant chrome extension to check the dynamic variables are sent to Contentsquare.