Adcontroller: Difference between revisions

 
(2 intermediate revisions by 2 users not shown)
Line 42: Line 42:


     var iqd_mode = (function () {
     var iqd_mode = (function () {
        var dm = window.location.href.toLowerCase();
      let mode = 'live';
        return (dm.indexOf('iqdeployment=') > 1) ? dm.split('iqdeployment=')[1].split('&')[0] : 'live';
      const currentUrlSearchParams = new URLSearchParams(window.location.search);
 
      if (currentUrlSearchParams.has('iqdeployment')) {
        mode = currentUrlSearchParams.get('iqdeployment').replace(/\W/g, '');
      }
 
      return mode;
     })();
     })();


Line 92: Line 98:


<div class="page-break"></div>
<div class="page-break"></div>
==Client's CMS object (page information used for configurating the AdController)==
==Client's CMS object (page information used for configurating the AdController)==


Line 212: Line 219:
<syntaxhighlight lang='html'>
<syntaxhighlight lang='html'>


<div class="iqdcontainer" data-placement="pos_[N U M M E R]" data-device="[D E V I C E T Y P E]"></div>
<div class="iqdcontainer" data-placement="pos_[N U M B E R]" data-device="[D E V I C E T Y P E]"></div>


</syntaxhighlight>
</syntaxhighlight>