Vdopia allows rich-midea and video ad units to be placed on mobile web pages through simple Javascript tags.
The API is designed for loading Vdopia ads directly using javascript or to load html via a proxy sitting on your servers.
This API is available on Vdopia servers at the location:
http://serve.vdopia.com/adserver/html5/inwapads
Parameters
Cache-busting
All tags received from Vdopia include a cache-busting parameter. e.g.
<script src='http://serve.vdopia.com/adserver/html5/inwapads/?adFormat=preappvideo;ak=AX123;version=1.0;cb=[timestamp]'></script>
The macro '[timestamp]' should be replaced with the correct macro for the ad-server into which this tag is being placed to ensure proper cache-busting. Please refer to your ad-server documentation for the correct macro - examples of cache-busting macros are '%n', '[RAND]'
Examples
NOTE: Examples are best viewed on Android/iOS devices. The pages also work on HTML5 friendly browsers like Safari and Chrome. Some/all links on the page where the tag is placed become trigger links, and a video ad is launched when a link is clicked. When the video ad completes (or is skipped), options to interact with the ad appear on screen (e.g. share on facebook, watch full trailer etc.). When the user closes the ad experiences the next page loads (going to the link initially clicked by the user)
All links on this page are ad triggers.
Tag used in example:
<script src='http://serve.vdopia.com/adserver/html5/inwapads/?adFormat=inappvideo&attr=href&val=*&ak=AX123&version=1.0'></script>
This tag specifies that all anchor tags with hrefs leading to any URL (wild-card) should be trigger links.
Form actions
Form submit actions also can trigger the inapp video ads. On this page submit action trigger the ads to play.
Tag used in example:
<script src='http://serve.vdopia.com/adserver/html5/inwapads/?adFormat=inappvideo&element=input&attr=value&val=Search&ak=AX123&version=1.0'></script>
This tag specifies that all the input element nodes with attribute name value set to value Search should be trigger links.
PreWap video ad
A video ad autoplays when the page is loaded. When the video ad completes (or is skipped), options to interact with the ad appear on screen (e.g. share on facebook, watch full trailer etc.).
without banner
http://i2.vdopia.com/dev/test/wap/vid.html
Tag used in example:
<script src='http://serve.vdopia.com/adserver/html5/inwapads/?adFormat=preappvideo&ak=AX123&version=1.0'></script>
http://i2.vdopia.com/dev/test/wap/vidbanner.html
Tag used in example:
<script src='http://serve.vdopia.com/adserver/html5/inwapads/?adFormat=preappvideo&serveBanner=1&ak=AX123&version=1.0'></script>
Tag pulls an image banner where it is placed. Default image size is 320x48.
Tag used in example:
<script src='http://serve.vdopia.com/adserver/html5/inwapads/?adFormat=banner&ak=AX123&version=1.0'></script>
Javascript Ad events
Detecting unavailable ads
If no ads are available then the JS returned by the call to fetch an ad throws an event that can be processed by the application. The event is called 'ivdoAdsUnavailable'.
Example of processing 'no ads' event:
window.addEventListener("ivdoAdsUnavailable", function(){alert("NO ADS AVAIALBALE");});
This event can be used, for example, to make a call to a remnant ad server to fetch an alternate ad.