Polite banner

1. Banner summary

ID Number: 24H037.
Description: a “heavy” banner with a “light” loader.
Type of the code: javascript, iframe, poster, ajax, extension.
Third party tracking: flash banner preparation for further AdRiver pixel insertion.

2. Banner preparation

Download an example and the sources of a loader. By default the loader try to load the file big.swf.

There are three cases of installation.

2.1. A banner and a loader are located in the AdRiver

To load a content in the loader you should add the following ActionScript:


loadMovieNum(_root.ar_comppath + 'flash_name.swf', 500);

where:

  • flash_name.swf is a banner’s file name, replace with your file name;
  • _root.ar_comppath is a variable containing the path to the banner in AdRiver.

The script into a button element in your flash-movie should correspond with AdRiver requirements.

2.2. A banner and a loader are located on a publisher’s website, an audit is performed via AdRiver

To audit this installation you should do the following steps:

  • Add the audit banner;
  • Get a reference, for example:
    
    Counter:
    http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&ad=119706&bt=55&pid=250384&bid=482081&bn=482081&rnd=788518980
    
    Link for a click:
    http://ad.adriver.ru/cgi-bin/click.cgi?sid=1&ad=119706&bt=55&pid=250384&bid=482081&bn=482081&rnd=788518980
    
  • Insert these links in the fields for audit in an other system (the same fields for the outside counters exist in the AdRiver too).

In case of using pixel-audit in the flash-movie, you should do the following steps:

  • Add the audit banner;
  • Get a reference, for example:
    
    Counter:
    http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&ad=119706&bt=55&pid=250384&bid=482081&bn=482081&rnd=788518980
    
    Link for a click:
    http://ad.adriver.ru/cgi-bin/click.cgi?sid=1&ad=119706&bt=55&pid=250384&bid=482081&bn=482081&rnd=788518980
    

    remove the value of the random number (highlighted in red);

  • First frame of a flash-movie should contain the following ActionScript:
    
    if (ar_init == undefined)
    {
    var ar_init = 1;
    loadMovieNum("pixel" + Math.round(Math.random() * 1000000), 500);
    }
    

    In ActionScript 3, use the following ActionScript:

    
    if(!this['ar_init']){
       this['ar_init'] = true;
       (new Loader()).load(new URLRequest("pixel" + Math.round(Math.random() * 1000000)));
    }
    
  • Replace the word “pixel” by an appropriate counter in AdRiver.

    Example (changes are highlighted in red):

    
    if (ar_init == undefined)
    {
    var ar_init = 1;
    loadMovieNum("http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&ad=119706&bt=55&pid=250384&bid=482081&bn=482081&rnd=" + Math.round(Math.random() * 1000000), 500);
    }
    

    Example in ActionScript 3 (changes are highlighted in red):

    
    if(!this['ar_init']){
       this['ar_init'] = true;
       (new Loader()).load(new URLRequest("http://ad.adriver.ru/cgi-bin/rle.cgi?sid=1&ad=119706&bt=55&pid=250384&bid=482081&bn=482081&rnd=" + Math.round(Math.random() * 1000000)));
    }
    
  • Enter the link for the click in the appropriate field in an other system.

The script into a button element in your flash-movie should correspond with requirements of a publisher’s website.

2.3. A banner is located in AdRiver and a loader is located on a publisher’s website, an audit is performed via AdRiver

To audit this installation you should do the following steps:

  • Add a redirect-flash banner (swf-file) or flv-video (flv-file) into AdRiver (these banner types have a location in AdRiver that can be passed an other system). Turn on the banner.

    When using the other system, don’t set up any targetings for a banner. We also recommend to specify the distribution of impressions throughout the day with a maximum speed.

  • Generate the banner code. You need only a link to the impressions (highlighted in red) of all the code. For example:
    
    <!--  AdRiver code START. Type:Redirect240x400 Site: example PZ: 0 BN: 0 -->
    <script language="javascript" type="text/javascript"><!--
    var RndNum4NoCash = Math.round(Math.random() * 1000000000);
    var ar_flashver = 6;
    var ar_html     = '';
    var ar_metrics  = ' width=240  height=400';
    var ar_redirect = 'link1=' + escape('http://ad.adriver.ru/cgi-bin/click.cgi?sid=94499&bt=44&pz=0&rnd=' + RndNum4NoCash + '&target=top');
    var ar_Tail='unknown'; if (document.referrer) ar_Tail = escape(document.referrer);
    
    ar_flashver = parseInt(ar_flashver);if(isNaN(ar_flashver)) ar_flashver = 0;
    
    function ar_flver(d,n,m,f){
        n = navigator;
        f = 'Shockwave Flash';
        if ((m = n.mimeTypes) && (m = m["application/x-shockwave-flash"]) && m.enabledPlugin && (n=n.plugins) && n[f]) {d = n[f].description;}
        else if(window.ActiveXObject) { try { d=(new ActiveXObject((f + '.' + f).replace(/ /g,''))).GetVariable('$version')}catch(e){}}
        return d ? d.replace(/D+/,'').split(/D+/)[0] : 0;
    }
    
    if(ar_flashver <= ar_flver()) {
            var ar_src = 'http://ad.adriver.ru/cgi-bin/erle.cgi?sid=94499&target=top&bt=44&pz=0&rnd=' + RndNum4NoCash + '&tail256=' + ar_Tail;
            ar_html = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + ar_metrics + '>'
            + '<param name=movie value="' + ar_src + '&' + ar_redirect + '">'
            + '<param name=play value=true>'
            + '<param name=loop value=true>'
            + '<param name=quality value=high>'
            + '<param name=menu value=false>'
            + '<param name=flashvars value="' + ar_redirect + '">'
            + '<param name=allowscriptaccess VALUE=always>'
            + '<embed type="application/x-shockwave-flash" src="' + ar_src + '"' + ar_metrics
            + ' play=true loop=true quality=high menu=false  flashvars="' + ar_redirect + '"></embed>'
    
            + '</object>';
    } else {
            ar_html = '<img src="http://mirror.adriver.ru/expelled.gif"' + ar_metrics + ' alt="You do not have a flash plugin" border=0>';
    }
    document.write(ar_html);
    //--></script>
    <script language="JavaScript" type="text/javascript" src="http://mirror.adriver.ru/ieupdate.js"></script><!--  AdRiver code END  -->
    
  • As a result the link to the expressions will look like the following example:
    
    http://ad.adriver.ru/cgi-bin/erle.cgi?sid=94499&target=top&bt=44&pz=0&rnd=[случайное число]
    
  • Clicks can be counted by adding so called “click-banner”.
  • The links for the impressions and for the click into the loader should correspond with the requirements of an other system.

The script into a button element in your flash-movie should correspond with requirements of a publisher’s website.

Last modified on 12.01.2012