This is an old revision of the document!
Description for Advertisement Content Provider
To integrate with the VAS Cloud, a potential content provider have to be able to:
- Upload ad content for its paratners using Javascript
- Collect daily statistics on clicks/conversions/accruals and return it through the API interface at the request of VAS Cloud
Requirements for downloading advertising content using Javascript
The script from VAS Cloud that runs on the advertiser's web page, creates containers for ads on the page and downloads (calls the download link) Javascript code of the content provider to display ads.
Example of a called link:
http://provider.com/service/promo/?bid=1526343&size=728x90&cid=49c479c957953b478efd791f050fc26e&bt=19&dv=123456789&sa=TestSubaccount
Among other parameters, VAS Cloud transmits the following parameters:
- dv - mandatory parameter specifying the container identifier (div) where the advertising content is to be inserted
- sa - mandatory parameter specifying subaccount. Click statistics and conversions gathered by the content provider should contain a subaccount grouping.
The URL, names and list of parameters are determined by the content provider.
An example of a script chain returned by a content provider using the CityAds example
//The script returned by reference http://cityads.com/service/promo/?bid=446095&size=728x90&cid=44c2189481de2001a2602b4ea86a271f&bt=19&dv=123456789?sa=TestSubaccount function syscount() { var f=0; var fv=0; var d=document; var w=window; var n=navigator; var s=screen; var stat_ref=null; var mt="application/x-shockwave-flash"; var stat_data="n="+n.appName+";"; if(parent!=w){try {stat_ref=parent.document.referrer;} catch(e){}} if(!stat_ref){stat_ref=d.referrer} if(s.colorDepth){stat_data+="cd="+s.colorDepth+";" } else {if(s.pixelDepth){stat_data+="cd="+s.pixelDepth+";"}} if(s.width&&s.height){stat_data+="s="+s.width+"x"+s.height+";"} var stat_loc=d.referrer; stat_data+="t="+ (new Date()).getTimezoneOffset(); var a2 = "&loc="+escape(stat_loc)+"&ref="+escape(stat_ref)+"&dat="+escape(stat_data); if(window.ActiveXObject){ var l=["",".3",".4",".5",".6",".7"]; for(i=0; i < l.length; i++){ try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash"+l[i]);f=1;fv=l[i]} catch(e){} } }else if(n.mimeTypes&&n.mimeTypes[mt]&&n.mimeTypes[mt].enabledPlugin) { f=1 if (n.mimeTypes[mt].enabledPlugin.description) { fv = n.mimeTypes[mt].enabledPlugin.description; } } var monitoring_request = 0; return a2+'&f='+f+'&fv='+fv+"&rn="+Math.random() + ((monitoring_request == 1) ? '&monitoring_request=' + monitoring_request : ''); } a = syscount(); a = a+'&dv=123456789?sa=TestSubaccount'; var d=document; var s=d.createElement('script'); s.type = 'text/javascript';s.async = true; s.src = '//cityads.com/service/banner?bid=446095&dv=123456789?sa=TestSubaccount&size=728x90&cid=44c2189481de2001a2602b4ea86a271f&bt=19'+a; var x=d.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x);
//The script returned by the link from the previous script //cityads.com/service/banner?bid=446095&dv=123456789?sa=TestSubaccount&size=728x90&cid=44c2189481de2001a2602b4ea86a271f&bt=19'+a nd = document.createElement("div"); nd.innerHTML = "<!-- default --><div id='ca-block-7743' class='ca-block'><OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH='728' HEIGHT='90'><PARAM NAME=movie VALUE='//promo.cityads.com/graph/s/446/095_20542-728x90.swf?clickTAG=http%3A%2F%2Fhskwq.com%2Fclick%3Fcid%3D44c2189481de2001a2602b4ea86a271f%26im%3DNDA4NS0wLTE1NTg5Nzg3NjAtOTIwMDcxMzgtLTRxamdsdTZsaGhsb2tqaG5xNTEwNWxpM2Q1%26sa%3D%26%26bid%3D446095%26bt%3D19%26pt%3D1%26tid%3D%26lt%3D%26tl%3D%26url%3Dhttps%253A%252F%252Fcity.travel%252Fhotels%253Fpartner%253Dcityads%2526marker%253D%2523tc_id%2523%2526wm_id%253D%2523wm_id%2523%2526click_id%253D%2523click_id%2523'><PARAM NAME=quality VALUE=best><PARAM NAME=flashVars VALUE='link1=http%3A%2F%2Fhskwq.com%2Fclick%3Fcid%3D44c2189481de2001a2602b4ea86a271f%26im%3DNDA4NS0wLTE1NTg5Nzg3NjAtOTIwMDcxMzgtLTRxamdsdTZsaGhsb2tqaG5xNTEwNWxpM2Q1%26sa%3D%26%26bid%3D446095%26bt%3D19%26pt%3D1%26tid%3D%26lt%3D%26tl%3D%26url%3Dhttps%253A%252F%252Fcity.travel%252Fhotels%253Fpartner%253Dcityads%2526marker%253D%2523tc_id%2523%2526wm_id%253D%2523wm_id%2523%2526click_id%253D%2523click_id%2523&clickTAG=http%3A%2F%2Fhskwq.com%2Fclick%3Fcid%3D44c2189481de2001a2602b4ea86a271f%26im%3DNDA4NS0wLTE1NTg5Nzg3NjAtOTIwMDcxMzgtLTRxamdsdTZsaGhsb2tqaG5xNTEwNWxpM2Q1%26sa%3D%26%26bid%3D446095%26bt%3D19%26pt%3D1%26tid%3D%26lt%3D%26tl%3D%26url%3Dhttps%253A%252F%252Fcity.travel%252Fhotels%253Fpartner%253Dcityads%2526marker%253D%2523tc_id%2523%2526wm_id%253D%2523wm_id%2523%2526click_id%253D%2523click_id%2523'><PARAM NAME=wmode VALUE=transparent><EMBED src='//promo.cityads.com/graph/s/446/095_20542-728x90.swf?clickTAG=http%3A%2F%2Fhskwq.com%2Fclick%3Fcid%3D44c2189481de2001a2602b4ea86a271f%26im%3DNDA4NS0wLTE1NTg5Nzg3NjAtOTIwMDcxMzgtLTRxamdsdTZsaGhsb2tqaG5xNTEwNWxpM2Q1%26sa%3D%26%26bid%3D446095%26bt%3D19%26pt%3D1%26tid%3D%26lt%3D%26tl%3D%26url%3Dhttps%253A%252F%252Fcity.travel%252Fhotels%253Fpartner%253Dcityads%2526marker%253D%2523tc_id%2523%2526wm_id%253D%2523wm_id%2523%2526click_id%253D%2523click_id%2523' flashVars='link1=http%3A%2F%2Fhskwq.com%2Fclick%3Fcid%3D44c2189481de2001a2602b4ea86a271f%26im%3DNDA4NS0wLTE1NTg5Nzg3NjAtOTIwMDcxMzgtLTRxamdsdTZsaGhsb2tqaG5xNTEwNWxpM2Q1%26sa%3D%26%26bid%3D446095%26bt%3D19%26pt%3D1%26tid%3D%26lt%3D%26tl%3D%26url%3Dhttps%253A%252F%252Fcity.travel%252Fhotels%253Fpartner%253Dcityads%2526marker%253D%2523tc_id%2523%2526wm_id%253D%2523wm_id%2523%2526click_id%253D%2523click_id%2523&clickTAG=http%3A%2F%2Fhskwq.com%2Fclick%3Fcid%3D44c2189481de2001a2602b4ea86a271f%26im%3DNDA4NS0wLTE1NTg5Nzg3NjAtOTIwMDcxMzgtLTRxamdsdTZsaGhsb2tqaG5xNTEwNWxpM2Q1%26sa%3D%26%26bid%3D446095%26bt%3D19%26pt%3D1%26tid%3D%26lt%3D%26tl%3D%26url%3Dhttps%253A%252F%252Fcity.travel%252Fhotels%253Fpartner%253Dcityads%2526marker%253D%2523tc_id%2523%2526wm_id%253D%2523wm_id%2523%2526click_id%253D%2523click_id%2523' wmode='transparent' quality=best WIDTH='728' HEIGHT='90' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED></OBJECT></div>"; var xelem=document.getElementById("x"+'123456789?sa=TestSubaccount'); var prot="http://cityads.com"; xelem.appendChild(nd); var id = Math.floor(Math.random() * 999); var rsc=document.createElement('script'); rsc.id='caRotation'; rsc.type='text/javascript'; rsc.language='javascript'; rsc.encoding='UTF-8'; rsc.className="ca-script" rsc.src=prot+'/res/js/promo/comp.js'; xelem.appendChild(rsc);
Statistics and API Requirements
Clicks/conversion statistics are collected by the content provider. The statistics should also include the amount of commission confirmed by the advertiser.
Statistics should be grouped by date (by day), identifier and advertiser's offer name, by subbaccount field.
The API can be either JSON-RPC or JSON REST to suit a content provider's needs. SOAP is supported but discouraged.
Statistic Fields:
- date(Timestamp) - date-time (grouped field)
- offer_id(Int) - offfer identified (grouped field)
- subaccount(Varchar) - subaccount (grouped field)
- offer_name(Varchar) - offer name
- traffic_shows(Int) - number of impressions
- traffic_hits(Int) - number of clicks
- traffic_clicks(Int) - number of unique clicks
- traffic_back_url
- leads_total
- leads_approved
- leads_opened
- leads_rejected
- leads_paid_targets
- effectivity_cr
- effectivity_ar
- effectivity_ecpc
- effectivity_ecpl
- commission_approved(Float) - commission confirmed by advertiser
- commission_opened(Float) - opened commission
- commission_rejected(Float) - rejected commission