{"_id":"564cfd4e2248461700bd4021","__v":11,"parentDoc":null,"project":"5429beef1163360800ed31fa","version":{"_id":"5429beef1163360800ed31fd","__v":22,"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","5a3718305c66a60012d960ba"],"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"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-18T22:35:58.717Z","link_external":false,"link_url":"","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 Polymorph performs a waterfall with each network 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 Polymorph with certain callbacks regardless whether the ad network has an ad to show. This benefits publishers in two ways,\n\n1. It allows Polymorph 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 Polymorph stops the waterfall. In case there is no ad to deliver by the ad network, Polymorph 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 Polymorph 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 Polymorph 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 Polymorph 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 Polymorph 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 a unique identifier for that network which is provided by Polymorph to the ad network.\n\n**Ad Networks (in-app):\n**\nSeveral ad-networks with their SDKs already implement the necessary callbacks; hence there are no additional integration steps required from the Ad Networks to make them work inside Polymorph. The necessary steps to make Ad Network SDKs play nicely with Polymorph is described [iOS](https://dev.getpolymorph.com/docs/ios-sdk) and [Android](https://dev.getpolymorph.com/docs/android-sdk) SDK pages.","excerpt":"Polymorph'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 Polymorph, 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

Polymorph'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 Polymorph, 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 Polymorph performs a waterfall with each network with certain timeouts. **Ad Networks (Web): ** To ensure timely delivery of the ads to the user, we expect ad networks to respond back to Polymorph with certain callbacks regardless whether the ad network has an ad to show. This benefits publishers in two ways, 1. It allows Polymorph 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 Polymorph stops the waterfall. In case there is no ad to deliver by the ad network, Polymorph 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 Polymorph 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 Polymorph 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 Polymorph 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 Polymorph to notify that, [block:code] { "codes": [ { "code": "window._an_adNoFill('<NETWORK_HANDLE>');", "language": "javascript" } ] } [/block] *<NETWORK_HANDLE>* is a unique identifier for that network which is provided by Polymorph to the ad network. **Ad Networks (in-app): ** Several ad-networks with their SDKs already implement the necessary callbacks; hence there are no additional integration steps required from the Ad Networks to make them work inside Polymorph. The necessary steps to make Ad Network SDKs play nicely with Polymorph is described [iOS](https://dev.getpolymorph.com/docs/ios-sdk) and [Android](https://dev.getpolymorph.com/docs/android-sdk) SDK pages.