====== VAS Cloud ====== {{indexmenu_n>9}} VAS Cloud - VAS Experts cloud services For convenient login to VAS Cloud you can configure authorization by token.\\ Description in [[dpi:dpi_components:dpiui:user_guide:admin_section:gui_man:man:token_auth|Authorization in VAS Cloud by token]] section. ===== Description for Advertisement Content Provider ===== To integrate with VAS Cloud, a potential ad content provider must 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 ===== A script from VAS Cloud launched on the advertiser's web page creates containers for advertising on the page and loads (invokes a download link) the content provider's Javascript code for displaying 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 the 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 link 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 = "
"; 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