Category: AB Testing
This integration is only available for Web projects
What to expect
This integration will allow you to segment users based on exposure to Monetate AB experiments. You can create a new Zoning based on the Monetate variation of your choice. Contentsquare automatically pulls both the data and the accurate snapshot from the variation selected.
What we collect
Dynamic Variables
Key | Value | Data Type |
AB_Mon_Campaign ID | {campaignID} | Text |
AB_Mon_Campaign Name | {campaignName} | Text |
Implementation
For Monetate Server Side solution you need to be using the Engine API with the "includeReporting" flag set to true. Please see this documentation for reference. Once enabled it will return an object with the information that we need:
Add and tweak the following code in your web server's server side code.
Note that in the code below the only part you need to tweak is where you see the ENGINE_API_PAYLOAD section which isn't a real object. This should be replace by the real object response that came back from Monetate's Engine API. This code is all javascript and should be rendered in the server response back to your site on every pageview and for every test. Please do not tweak any other code logic above that.
/* *Name: Monetate Server Side CS Integration *Version: 1.0.0 */ function callback() { var version = "1.0.0"; if (!disableCallback) { disableCallback = true; if (window.CS_CONF) { CS_CONF.integrations = CS_CONF.integrations || []; CS_CONF.integrations.push("Monetate Server Side - v" + version); } } } var disableCallback = false; window._uxa = window._uxa || []; _uxa.push(["afterPageView", callback]); var tvp = "AB_Mon_SS_"; function sendToCS(csKey, csValue) { csKey = tvp + csKey; _uxa.push([ "trackDynamicVariable", { key: csKey, value: csValue, }, ]); } /* Only the following code needs to be tweaked. Note the[ENGINE_API_PAYLOAD] below code is merely a placeholder which should be replaced by the payload response that the Kibo Engine API sends to you based on this documentation: https://docs.kibocommerce.com/115777-the-engine-api/638179-implement-third-party-analytics-with-the-engine-api Note that the payload could contain multiple indexes which is why there is a loop. All you need to do is replace [ENGINE_API_PAYLOAD] with the response object array. */ for (let i = 0; i < [ENGINE_API_PAYLOAD].impressionReporting.length; i++) { var campaignName = [ENGINE_API_PAYLOAD].impressionReporting[i].experience_label; var experienceName = [ENGINE_API_PAYLOAD].impressionReporting[i].impressionReporting.variant_label; sendToCS(campaignName, experienceName); }
For Monetate Client Side solution resume below.
Go to your Monetate back office https://marketer.monetate.net/ and make sure Contentsquare is enabled on existing experiences third-party analytics settings
1. Select your project
2. Go to the ⚙️ 'Settings' drop-down menu and select 'Integration'
3. Go to the 'Third Party Analytics' tab and Click 'CONTENTSQUARE'
4. Open a new tab and log in to Contentsquare, then go to the Console.
5. Access the project you would like to use Monetate with
6. Go to the 'Integrations' tab section and select Monetate
7. Click '+ Add New'
8. Add API Account Name and API Access Token to the Contentsqurae console:
- Go back to Monetate and click 'Copy' next to the 'API Account name'
- Insert your API account name provided by Monetate above in Contentsquare
- Repeat these same steps for the 'API Access Token' and then click 'Submit'
9. Give a name to this integration, select the sites for which segments should be imported and click 'Add integration'
You should then see the integration active in your integrations menu
IP Exclusions
Before you put the integration live you should do a comparison between IP’s that are excluded in Monetate and IPs that are excluded in Contentsquare.
You should also add the Monetate office IPs to Contentsquare’s exclusion rules (please speak to your Monetate CSM to get these) and you should exclude the Contentsquare office IP’s within Monetate (your Contentsquare CSM can provide these).
To configure or check the Monetate IP exclusion rules, do the following:
1. Go to the ⚙️ 'Settings' drop-down menu and select 'Sites'
2. Go to the 'Stealth Groups' tab
3. Click on '+ Create Stealth Group'
4. Input a description of the group's purpose and click 'Save'.
Verifying it works
You can use the chrome extension to check the results are sent to CS
In case you need to find the Campaign ID in your Monetate account, which is sent to Contentsquare as a dynamic variable, you can find it in the URL of each campaign like this for example: