{"_id":"564cfd4e2248461700bd4021","__v":10,"parentDoc":null,"project":"5429beef1163360800ed31fa","version":{"_id":"5429beef1163360800ed31fd","__v":21,"project":"5429beef1163360800ed31fa","createdAt":"2014-09-29T20:19:59.904Z","releaseDate":"2014-09-29T20:19:59.904Z","categories":["5429beef1163360800ed31fe","55e74e1f5d36b32b002563fa","55e7500a73169617001f2e86","55e76b8196131b2f00bf4b72","55e89569cdbb8a350096df9c","55f8935eb089b71700a8364e","55f8a67d3bb4bb0d0022d093","55f9dbefc7ef770d00d9bf6d","5601c21a22ecf60d002b27b3","5601c21ff12aee0d001bb06e","5601c2256c7b610d00280db5","5601c22c22ecf60d002b27b4","5603738d0c78b00d0039af47","5626f70bfcbbc621004ebf52","566f7a1ae144ab0d00e9732f","566f85ca7820960d00c3b93d","56708ce43a32d20d00c45cbf","56708d436995210d003aad8e","5736471abe10a9200030732c","57a82c7aff9bd30e00a6f1c1","591b8500e3992319007190f4"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"5625457f23053b2300f596c9","category":{"_id":"5603738d0c78b00d0039af47","project":"5429beef1163360800ed31fa","pages":["561311eb41a9ec0d00a3fdf8","56958542cb14e11700f8a86e","56ad90e50c1cab0d009f658b"],"version":"5429beef1163360800ed31fd","__v":3,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-24T03:52:45.801Z","from_sync":false,"order":5,"slug":"exchange","title":"Marketplace"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-18T22:35:58.717Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":5,"body":"We rank various ad networks in our system based on their historic performance eCPM performance or the value directly set by the publishers in our system, and also general fill-rate of the ad network. Based on this ranking AdsNative performs a waterfall with each networks with certain timeouts. \n\n**Ad Networks (Web):\n**\nTo ensure timely delivery of the ads to the user, we expect ad networks to respond back to AdsNative with certain callbacks regardless whether the ad network has an ad to show. This benefits publishers in two ways,\n\n1. It allows AdsNative to take decisive further action on timely fashion without having to wait till the timeout. More responsive the network higher the chances of getting that ad network ranked higher. In case there an ad to show by the ad network AdsNative stops the waterfall. In case there is no ad to deliver by the ad network, AdsNative will continue the waterfall on to the next network in the queue. Failure to respond to either of those callbacks within the timeouts results into penalty to the ad network as it contributes to the slower ad delivery to the end user and eventually lesser revenue making opportunity.\n\n2. In case of failure to deliver the ad by the network it allows AdsNative to take the appropriate action on the client side to avoid any bad user experience to the end user, such as empty spots.\n\nThere are two types of callbacks AdsNative expects ad networks to make to address the above two points.\n\n1. When there is an ad to deliver by the ad network, it should make following function call to notify AdsNative of that,\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"window._an_adFill('<NETWORK_HANDLE>');\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n2. When there is no ad that can be delivered by the ad network, it should make following function call to AdsNative to notify that,\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"window._an_adNoFill('<NETWORK_HANDLE>');\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n*<NETWORK_HANDLE>* is an unique identifier for that network which is provided by AdsNative to the ad network.\n\n**Ad Networks (in-app):\n**\nSeveral ad-networks with their SDKs already implement the necessary callbacks; hence there is no additional integration steps required from the Ad Networks to make them work inside AdsNative. The necessary steps to make Ad Network SDKs play nicely with AdsNative is described [iOS](http://dev.adsnative.com/docs/ios-sdk) and [Android](http://dev.adsnative.com/docs/android-sdk) SDK pages.","excerpt":"AdsNative's Demand Manager platform allows customers to mediate between multiple ad networks for a particular placement. To enable your ad network to work gracefully with AdsNative, you can support certain callbacks on client side to work with our waterfall.","slug":"ad-network-integration-adsnative-mediation","type":"basic","title":"Ad Networks"}

Ad Networks

AdsNative's Demand Manager platform allows customers to mediate between multiple ad networks for a particular placement. To enable your ad network to work gracefully with AdsNative, you can support certain callbacks on client side to work with our waterfall.

We rank various ad networks in our system based on their historic performance eCPM performance or the value directly set by the publishers in our system, and also general fill-rate of the ad network. Based on this ranking AdsNative performs a waterfall with each networks with certain timeouts. **Ad Networks (Web): ** To ensure timely delivery of the ads to the user, we expect ad networks to respond back to AdsNative with certain callbacks regardless whether the ad network has an ad to show. This benefits publishers in two ways, 1. It allows AdsNative to take decisive further action on timely fashion without having to wait till the timeout. More responsive the network higher the chances of getting that ad network ranked higher. In case there an ad to show by the ad network AdsNative stops the waterfall. In case there is no ad to deliver by the ad network, AdsNative will continue the waterfall on to the next network in the queue. Failure to respond to either of those callbacks within the timeouts results into penalty to the ad network as it contributes to the slower ad delivery to the end user and eventually lesser revenue making opportunity. 2. In case of failure to deliver the ad by the network it allows AdsNative to take the appropriate action on the client side to avoid any bad user experience to the end user, such as empty spots. There are two types of callbacks AdsNative expects ad networks to make to address the above two points. 1. When there is an ad to deliver by the ad network, it should make following function call to notify AdsNative of that, [block:code] { "codes": [ { "code": "window._an_adFill('<NETWORK_HANDLE>');", "language": "javascript" } ] } [/block] 2. When there is no ad that can be delivered by the ad network, it should make following function call to AdsNative to notify that, [block:code] { "codes": [ { "code": "window._an_adNoFill('<NETWORK_HANDLE>');", "language": "javascript" } ] } [/block] *<NETWORK_HANDLE>* is an unique identifier for that network which is provided by AdsNative to the ad network. **Ad Networks (in-app): ** Several ad-networks with their SDKs already implement the necessary callbacks; hence there is no additional integration steps required from the Ad Networks to make them work inside AdsNative. The necessary steps to make Ad Network SDKs play nicely with AdsNative is described [iOS](http://dev.adsnative.com/docs/ios-sdk) and [Android](http://dev.adsnative.com/docs/android-sdk) SDK pages.