Category: AB Testing
This integration is only available for Web projects
What to expect
This integration will allow you to analyse AB Test campaigns directly in CS Digital and easily discover and explore customer behavior across all digital channels and devices in order to build and test ever-better customer experiences. For instance, you can segment all sessions that experienced an AB test variation from the Analysis Context in Contentsquare and see corresponding metrics in the Zone-based Heatmaps and Session Replay modules in order to deeply understand UX behaviors and the corresponding performance.
What we collect
Dynamic Variables
Key | Value | Data Type |
AB_LD_{Campaign Name} | True | Text |
Implementation
Implementation Steps
Step 1
Please go to the section How to request an integration to see the instructions to enable this integration. You can then return here once completed.
If you have already completed the step above then continue below.
Step 2
const ldclient = LDClient.initialize(LD_CLIENT_SIDE_ID,user);
//--- Contentsquare Integration Start --- function callCShandler() { window.CS_CONF.integrations_handler.launchdarkly(ldclient); } if ( window.CS_CONF && window.CS_CONF.integrations_handler && window.CS_CONF.integrations_handler.launchdarkly ) { callCShandler(); } else { window.addEventListener("Contentsquare_LD_Integration_Launch", () => { callCShandler(); }); } //--- Contentsquare Integration End ---
If you are not using a client side SDK yet then you can manually create the following global object which you need to push your feature flags into, the same as you would for a Google Analytics integration with LaunchDarkly.
Please make sure the flags argument is an object which contains the key and value of the flags which is the name and value of your tests. Note that this will not work for event/action based tests, only tests that run on page load. In order to overcome that limitation you would need to use the client side SDK version.
window.ldMeta = Object.entries(flags).map(([k, v]) => { return { experience: k, name: v }; });
Verifying it works
You can use the chrome extension to check the results are sent to CS