Search Engine: Elastic

Article ID: 132429, created on Mar 22, 2018, last review on Mar 22, 2018

  • Applies to:
  • Operations Automation 7.1
  • Operations Automation 7.2
  • Operations Automation 7.3


It is possible to use the Web-analytics Integration feature to build-in a customer JavaScript code into the Customer Control Panel. But how to run different code for CCP v1 and CCP v2?


This can be done by analysing the CCP URL. For example, the following approach can be used:

<script type="text/javascript">

var getLocation = function(href) {var l = document.createElement("a"); l.href = href; return l;};
var u = getLocation(window.location.href;);
i = u.pathname.split('/');

if (i[1] == 'ccp'){
    <paste the CCP v2 code here>
else {
    <paste CCP v1 code here>


The customer JS code is placed to OA > System > Settings > Brands > YourBrand > Web-Analytics Integration.

31987597efff5a3a9ce779cc203bbe5e caea8340e2d186a540518d08602aa065 e12cea1d47a3125d335d68e6d4e15e07 5356b422f65bdad1c3e9edca5d74a1ae 1941880841f714e458ae4dc3d9f3062d 8c199f0ee4305da1a577740620df4a51 dd79f16c76b9dca75205ab5e9f5465ea

Email subscription for changes to this article
Save as PDF