See also:
Conversion Engine: Implementation
This section will guide you through the initial steps that need to be taken in order to set up the Cxense Conversion Engine.
Deployment
The following sample scripts assumes there is now Cxense code on the page. Existing sendPageViewEvent from the standard Cxense tag needs to be removed.
-
Load https://cdn.cxense.com/cx.cce.js in page.
-
Ideally synchronous loading, but it also supports the exact same call queue mechanisms as cx.js as well.
-
-
Initialize the cX and cX.CCE variables:
var cX = window.cX = window.cX || {}; cX.callQueue = cX.callQueue || []; cX.CCE = cX.CCE || {}; cX.CCE.callQueue = cX.CCE.callQueue || [];
-
Create a persisted query for pushing events through the /dmp/push API. See this article for how to set it up.
-
Initialize CCE specifying customer prefix and persisted query id prior to sending the insight pageview. This will replace the standard Insight tag.
cX.setSiteId('<siteId>'); cX.CCE.sendPageViewEvent('<prefix>', '<persisted query id>');
cX.callQueue.push(['setSiteId','<siteId>']); cX.CCE.callQueue.push(['sendPageViewEvent','<prefix>', '<persisted query id>']);
-
Invoke the cX.CCE.run() method. It supports all the same settings as cX.insertWidget(), but can be invoked with less input and also supports a callback method that is called after the results have been rendered into the page. For most standard implementations, simply invoke:
cX.CCE.run({ widgetId : '<id>', targetElementId : '<div>'});
cX.CCE.callQueue.push(['run', { widgetId : '<id>', targetElementId : '<div>'}]);
cX.CCE.run({ widgetId : '<id>', callback : '<callback_function>'});
-
Instrument events to ensure that conversion tracking and subscriber events is captured and that a solid data foundation for the "Propensity to Subscribe" model in generated (see Machine Learning Models and Funnel Instrumentation Page).
Example: https://onboarding.cxense.com/public/test/cxsamples/cce-sample.html
Docs more background (WIP): https://cce.cxense.com/public/campaign-set-preview.html
Until the examples are updated you’ll notice the visible HTML does not align with what actually happens under the hood. The visible prose is correct, what happens under the hood will be updated.
Should you require further information on setting up CCE, please contact your Account manager or support@piano.io