Adcontroller: Difference between revisions

2,702 bytes removed ,  14 April 2023
Line 234: Line 234:


</syntaxhighlight>
</syntaxhighlight>
===Signals & Ad structure===


====AdController.render(..)====
==Signals & Ad structure==


After the AdController is initialized, it is ready to send an ad request to the AdServer. An ad request is triggered by the respective ad placement with the corresponding AdController.render method. In the render phase of the AdController, the level information of the CMS client object is passed to the AdRequest Builder and combined with other configuration parameters of the deployment to built an AdServer-compliant ad request.


Which ad placements are to be implemented for the respective layout of your website should be discussed in advance with iq digital regarding marketing possibilities. The ad placement is to be implemented by a unique DOM element with exemplary id=iqadtileT I L E N U M B E R in your HTML-MarkUp. The passed position key within the AdCongroller.render call causes an asynchronous integration via DOM insertion of the delivered ad in the target container.


Please do not insert any other DOM or script components within these ad containers. The ad labelling of the ad placements is best done by iq digital. We would be happy to discuss this point with you.
===AdController.finalize(..)===
 
====TopBanner constuct====
 
Ad placement TopBanner construct, includes the first position iqadtile1 and both sky positions (please implement 1:1 the same way):
 
<syntaxhighlight lang='html'>
<!-- please use this construct for the top positions (iqadtile1), the sky right part (iqadtile21) & the left sky part (iqadtile20) and the out-of-page position (iqadtileOOP)-->
<div id="iqadtileOOP">
    <script>
          AdController.render('iqadtileOOP');
    </script>
</div>
<div id="iqd_mainAd">
    <div id="iqd_align_Ad">
        <div id="iqd_topAd">
            <div id="iqadtile1">
                <script>
                    AdController.render('iqadtile1');
                </script>
            </div>
        </div>
        <div id="iqd_leftAd">
            <div id="iqadtile20">
                <script>
                    AdController.render('iqadtile20');
                </script>
            </div>
        </div>
        <div id="iqd_rightAd">
            <div id="iqadtile21">
                <script>
                    AdController.render('iqadtile21');
                </script>
            </div>
        </div>
    </div>
</div>
</syntaxhighlight>
 
====additional ad postions====
 
Implement all further placements according to the following pattern:
 
<syntaxhighlight lang='html'>
<!-- please use this pattern for all other positions -->
<div id="iqadtileT I L E N U M B E R">
    <script>
        if (typeof AdController !== 'undefined') {
          AdController.render('iqadtileT I L E N U M B E R');
        }
    </script>
</div>
</syntaxhighlight>
 
====AdController.finalize(..)====


With the AdController.finalize call, the web page signals the AdController that the rendering phase can be completed because no further ad requests from the page are implemented. In some cases, the planned AdController configuration for the current page may differ from the actual implemented ad placements. In this case, the AdController evaluates the deviations, intercepts them and logs them if necessary. Deviations can always occur if no specific $handle assignment has been planned for the offer in question. This can also be a scenario desired by iq digital.
With the AdController.finalize call, the web page signals the AdController that the rendering phase can be completed because no further ad requests from the page are implemented. In some cases, the planned AdController configuration for the current page may differ from the actual implemented ad placements. In this case, the AdController evaluates the deviations, intercepts them and logs them if necessary. Deviations can always occur if no specific $handle assignment has been planned for the offer in question. This can also be a scenario desired by iq digital.
Line 308: Line 250:


<div class="page-break"></div>
<div class="page-break"></div>
====IQDComplete() - Pageload signal====
===IQDComplete() - Pageload signal===


As soon as all content on the page (including delayed dynamically loaded content) that contributes to the height calculation of the page has been loaded, a signal should be sent to iq digital:
As soon as all content on the page (including delayed dynamically loaded content) that contributes to the height calculation of the page has been loaded, a signal should be sent to iq digital: