Category: Analytics
This integration is only available for Web projects
What to expect
This integration will allow you to analyze data from anywhere in the customer journey using your Adobe Analytics segments. Contentsquare allows you to use your Adobe Analytics segments in every Contentsquare feature (Journey Analysis, Page Comparator, Zoning Analysis, Session Replay).
To import your segments, you need to add a snippet of code to your Adobe code configuration. This code pushes a unique identifier to Adobe Analytics. It helps us match Adobe Analytics sessions with Contentsquare one's.
What we collect
Dynamic Variables
Key | Value | Data Type |
csMatchingKey | {csMatchingKey} | Text |
csMatchingKey
Refers to the unique value used to cross reference Adobe segments with Contentsquare sessions.
Implementation
Implementation Steps
Create an eVar
There are many ways to integrate the code but we will cover the following options:
- Adobe Launch - Adobe Analytics Extension
- Adobe Launch - Adobe Experience Platform Web SDK Extension
- doPlugins function (Adobe Analytics legacy configurations)
- Tealium Tag Manager
Adobe Launch - Adobe Analytics Extension
Adobe Launch - Adobe Experience Platform Web SDK Extension
doPlugins function (Adobe Analytics legacy configurations)
s.eVarX = cmk;
Tealium Tag Manager configuration
Grab the relevant code below in the code section and paste it in there.
The Code
Please note that if you have a cookie policy which requires our cookies to first be accepted before injection, then it is up to you to ensure the code below is wrapped in your cookie consent policy logic.
Adobe Launch - Adobe Analytics Extension & doPlugins function
/* *Name: Adobe Analytics CS Integration *Version: 1.9.0 (Adobe Launch + csMatchingKey) */ (function () { var version = "1.9.0"; function callback() { if (!disableCallback) { disableCallback = true; if (window.CS_CONF) { CS_CONF.integrations = CS_CONF.integrations || []; CS_CONF.integrations.push("Adobe Analytics - v" + version); } } } var disableCallback = false; window._uxa = window._uxa || []; _uxa.push(["afterPageView", callback]); var cmk = null; var cn = "_cs_mk_aa"; function init(cookieValue) { if (cookieValue) { cmk = cookieValue; } else { cmk = Math.random() + "_" + Date.now(); var tld = (function () { var i = 0, domain = document.domain, p = domain.split("."), s = "_cs_tld" + new Date().getTime(); while (i < p.length - 1 && document.cookie.indexOf(s + "=" + s) == -1) { domain = p.slice(-1 - ++i).join("."); document.cookie = s + "=" + s + ";domain=" + domain + ";SameSite=None;Secure"; } document.cookie = s + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=" + domain + ";"; return domain; })(); var now = new Date(); var time = now.getTime(); time += 30 * 60 * 1000; now.setTime(time); document.cookie = cn + "=" + cmk + "; expires=" + now.toUTCString() + ";path=/;domain=" + tld + ";SameSite=None;Secure"; } s.eVarX = cmk; _uxa.push([ "trackDynamicVariable", { key: "csMatchingKey", value: cmk, }, ]); } var cookies = "; " + document.cookie; if (cookies) { var getCookie = cookies.split("; " + cn + "="); if (getCookie.length == 1) { init(); } else { var cookieValue = getCookie[1].split(";")[0]; init(cookieValue); } } })(); //Adobe Analytics CS Integration End
Adobe Launch - Adobe Experience Platform Web SDK Extension
/* *Name: Adobe Analytics CS Integration *Version: 1.0.0 (Adobe Launch / Adobe Experience Platform Web SDK Extension) */ (function () { var version = "1.0.0"; function callback() { if (!disableCallback) { disableCallback = true; if (window.CS_CONF) { CS_CONF.integrations = CS_CONF.integrations || []; CS_CONF.integrations.push("Adobe Analytics - v" + version); } } } var disableCallback = false; window._uxa = window._uxa || []; _uxa.push(["afterPageView", callback]); var cmk = null; var cn = "_cs_mk_aa"; function init(cookieValue) { if (cookieValue) { cmk = cookieValue; } else { cmk = Math.random() + "_" + Date.now(); var tld = (function () { var i = 0, domain = document.domain, p = domain.split("."), s = "_cs_tld" + new Date().getTime(); while (i < p.length - 1 && document.cookie.indexOf(s + "=" + s) == -1) { domain = p.slice(-1 - ++i).join("."); document.cookie = s + "=" + s + ";domain=" + domain + ";SameSite=None;Secure"; } document.cookie = s + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=" + domain + ";"; return domain; })(); var now = new Date(); var time = now.getTime(); time += 30 * 60 * 1000; now.setTime(time); document.cookie = cn + "=" + cmk + "; expires=" + now.toUTCString() + ";path=/;domain=" + tld + ";SameSite=None;Secure"; } content.xdm. _experience.analytics.customDimensions.eVars.eVarX = cmk; _uxa.push([ "trackDynamicVariable", { key: "csMatchingKey", value: cmk, }, ]); } var cookies = "; " + document.cookie; if (cookies) { var getCookie = cookies.split("; " + cn + "="); if (getCookie.length == 1) { init(); } else { var cookieValue = getCookie[1].split(";")[0]; init(cookieValue); } } })(); //Adobe Analytics CS Integration End
Tealium Tag Manager
/* *Name: Adobe Analytics CS Integration *Version: 1.11.0 (Tealium + csMatchingKey) */ (function () { var version = "1.11.0"; function callback() { if (!disableCallback) { disableCallback = true; if (window.CS_CONF) { CS_CONF.integrations = CS_CONF.integrations || []; CS_CONF.integrations.push("Adobe Analytics - v" + version); } } } var disableCallback = false; window._uxa = window._uxa || []; _uxa.push(["afterPageView", callback]); var cmk = null; var cn = "_cs_mk_aa"; function init(cookieValue) { if (cookieValue) { cmk = cookieValue; } else { cmk = Math.random() + "_" + Date.now(); var now = new Date(); var time = now.getTime(); time += 30 * 60 * 1000; now.setTime(time); document.cookie = cn + "=" + cmk + "; expires=" + now.toUTCString() + ";path=/;domain=." + utag.cfg.domain + ";SameSite=None;Secure"; } b.cs_matching_key = cmk; _uxa.push([ "trackDynamicVariable", { key: "csMatchingKey", value: cmk, }, ]); } if (!b["cp._cs_mk_aa"]) { init(); } else { var getCookieValue = b["cp._cs_mk_aa"]; init(getCookieValue); } })(); //Adobe Analytics CS Integration End
Verifying it works
Adobe Analytics Connector Configuration
After you have completed the steps above, you'll need to configure your Adobe Analytics Connector using this documentation.
Limitations
This integration relies on pushing an identifier (the 'csMatchingKey') in an Adobe eVar. This identifier is then used to match our sessions and flag them as belonging to the queries' Adobe segments.
Adobe limitation: when a variable reaches 500,000 unique values, data is bucketed under "Low Traffic", meaning that identifiers falling in that bucket cannot be accessed to match Contentsquare sessions. This mechanism results in a form of random sampling on the Adobe side past the 500,000 thresholds, and this sampling gets more aggressive after 1,000,000 unique values. This can create data gaps between the number of sessions observed in Adobe vs Contentsquare for a given segment.
You can change the limit threshold by contacting Adobe, as suggested by Adobe in their documentation.