Multiple Ajax V4 Tag - Implementation

Multiple Ajax V4 Tag - Implementation

 

This is the recommended option for publishers.


Implementation


The codes will be implemented per zone, for each site page that belongs to a zone— it must contain the codes for that particular zone.

Ex1:
The URL
http://www.nytimes.com/pages/politics/index.html
will belong to 'Politics' and must contain the zone code categorized as 'Politics'

Ex2:
The URL
http://www.bbc.co.uk/
will belong to 'Home' zone and must contain the zone code categorized as 'Home'”

 


The codes can be obtained by entering the interface: Inventory / Zone / HTML Code / AJAX MULTIPLE

 

IMPORTANT
The code should be included at the beginning of the body tag of html.

Place the following javascript code at the beginning of the <BODY> tag on the pages you want to implement e-planning.

<script language='JavaScript' type='text/javascript'><!--
var eplDoc = document; var eplLL = false;
var eS1 = 'us.img.e-planning.net';var eplArgs = { iIF:1,sV:'http://ads.e-planning.net/',vV:'4',sI:'841',sec:'Home',eIs:[Leaderboard','Box_Banner','Expandable'], kVs:{frut:'apples' ,verd:'spinach|chard'} };
function eplCheckStart() {
    if (document.epl) {
        var e = document.epl;
        if (e.eplReady()) {
            return true;
        } else {
            e.eplInit(eplArgs);
            return e.eplReady();       
        }
    } else {
        if (eplLL) return false;
        if (!document.body) return false; var eS2; var dc = document.cookie; var ci = dc.indexOf('EPLSERVER=');
        if (ci != -1) {
            ci += 10; var ce = dc.indexOf(';', ci);
            if (ce == -1) ce = dc.length;
            eS2 = dc.substring(ci, ce);
        }
       
        var eIF = document.createElement('IFRAME');
        eIF.src = 'about:blank'; eIF.id = 'epl4iframe'; eIF.name = 'epl4iframe';
        eIF.width=0; eIF.height=0; eIF.style.width='0px'; eIF.style.height='0px';
        eIF.style.display='none'; document.body.appendChild(eIF);
       
        var eIFD = eIF.contentDocument ? eIF.contentDocument : eIF.document;
        eIFD.open();eIFD.write('<html><head><title>e-planning</title></head><bo'+'dy></bo'+'dy></html>');eIFD.close();
        var s = eIFD.createElement('SCRIPT'); s.src = 'http://' + (eS2?eS2:eS1) +'/layers/epl-41.js';
        eIFD.body.appendChild(s);
        if (!eS2) {
            var ss = eIFD.createElement('SCRIPT');
            ss.src = 'http://ads.e-planning.net/egc/4/7ec7';
            eIFD.body.appendChild(ss);
        }
        eplLL = true;
        return false;
    }
}
eplCheckStart();
function eplSetAd(eID,custF) {
    if (eplCheckStart()) {
        if (custF) { document.epl.setCustomAdShow(eID,eplArgs.custom[eID]); }
        document.epl.showSpace(eID);
    } else {
        var efu = 'eplSetAd(''+eID+'', '+ (custF?'true':'false') +');';
        setTimeout(efu, 250);   
    }
}

function eplAD4M(eID,custF) {
    document.write('<div id='eplAdDiv'+eID+''></div>');
    if (custF) {
        if (!eplArgs.custom) { eplArgs.custom = {}; }
        eplArgs.custom[eID] = custF;
    }
    eplSetAd(eID, custF?true:false);
}
//--></script>

 

<script type='text/javascript'>eplAD4M(' Leaderboard');</script>

 
<script type='text/javascript'>eplAD4M('Box_Banner' );</script>

<script type='text/javascript'>eplAD4M('Expandable' );</script>

 


Locate on the page the request to the space (This will determine where the banner will be displayed)