{"_id":"597df3c817748e0015e7e144","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"},"category":{"_id":"5601c22c22ecf60d002b27b4","pages":["5601d37b70694e0d00e3c67e","5601d3a0d3ffde0d006abbd0","5601d3fd96e0f70d0044b110","5601d42096e0f70d0044b112","5601d45d7435de0d00fabc27","5601d48170694e0d00e3c680","561c925fac06982100493d19","56606f35bb77350d0073249b","567090d51dabd80d00b122ca","56abc1004e8ba20d006a23c9"],"version":"5429beef1163360800ed31fd","__v":10,"project":"5429beef1163360800ed31fa","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-22T21:03:40.067Z","from_sync":false,"order":7,"slug":"demand-manager","title":"Demand Manager"},"user":"563b4a20dfa1282b000dd262","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-07-30T14:57:12.147Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":999,"body":"Polymorph is a Demand Management platform that provides publishers the ability to mediate 75+ server-to-server demand sources including OpenRTB bidders and Networks. However, as a mobile app publisher who is already using MoPub, you can plug into Polymorph's demand via MoPub's mediation.\n\nThis document explains in detail how to mediate Polymorph on MoPub.\n\n<i>Note: The support is currently available only for Android. We will add the support for iOS soon </i>\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Custom Native Network on MoPub\"\n}\n[/block]\nYou can setup Polymorph as a network using Custom Events on MoPub. Once you login to MoPub and navigate to the Networks section of your UI, select \"Add A Network\" and in the modal, select \"Custom Native Network\". Next, enter the Custom Event class information into the text boxes for each ad unit where you want to receives ads from Polymorph. We have provided our Custom Event class names below.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/70a013b-Screen_Shot_2017-07-30_at_8.38.13_PM.png\",\n        \"Screen Shot 2017-07-30 at 8.38.13 PM.png\",\n        2104,\n        598,\n        \"#f1f8f1\"\n      ]\n    }\n  ]\n}\n[/block]\nAs you can see in the screenshot above, you need to enter <code>com.mopub.nativeads.PolymorphNativeAdNetwork</code> into the Custom Event Class field. You also need to enter the placement id JSON (in the same format as shown in the screenshot above) into the Custom Event Class Data field. The placement id that you need to enter will be of your Polymorph ad placement which you can find on Polymorph console under Placements tab.\n[block:api-header]\n{\n  \"title\": \"2. Polymorph SDK and Adapter\"\n}\n[/block]\nAfter you have setup Custom Event Class in MoPub, you need to import Polymorph SDK and Adapter into your mobile app project.\n\n<b>For Android</b>\n\na. Import Polymorph SDK (aar) from https://github.com/picatcha/adsnative-sdk-android/blob/master/adsnative_sdk/adsnative-sdk-2.6.0.aar into your Android project's libs folder\nb. Add <code>compile(name:'adsnative-sdk-2.6.0', ext:'aar')</code> to your build.gradle\nc. Copy the <code>PolymorphNativeAdNetwork.java</code> from https://github.com/picatcha/adsnative-sdk-android/blob/master/networks/PolymorphNativeAdNetwork.java to <code>com.mopub.nativeads</code> package in your Android project","excerpt":"","slug":"mediating-polymorph-on-mopub","type":"basic","title":"Mediating Polymorph on MoPub"}

Mediating Polymorph on MoPub


Polymorph is a Demand Management platform that provides publishers the ability to mediate 75+ server-to-server demand sources including OpenRTB bidders and Networks. However, as a mobile app publisher who is already using MoPub, you can plug into Polymorph's demand via MoPub's mediation. This document explains in detail how to mediate Polymorph on MoPub. <i>Note: The support is currently available only for Android. We will add the support for iOS soon </i> [block:api-header] { "type": "basic", "title": "1. Custom Native Network on MoPub" } [/block] You can setup Polymorph as a network using Custom Events on MoPub. Once you login to MoPub and navigate to the Networks section of your UI, select "Add A Network" and in the modal, select "Custom Native Network". Next, enter the Custom Event class information into the text boxes for each ad unit where you want to receives ads from Polymorph. We have provided our Custom Event class names below. [block:image] { "images": [ { "image": [ "https://files.readme.io/70a013b-Screen_Shot_2017-07-30_at_8.38.13_PM.png", "Screen Shot 2017-07-30 at 8.38.13 PM.png", 2104, 598, "#f1f8f1" ] } ] } [/block] As you can see in the screenshot above, you need to enter <code>com.mopub.nativeads.PolymorphNativeAdNetwork</code> into the Custom Event Class field. You also need to enter the placement id JSON (in the same format as shown in the screenshot above) into the Custom Event Class Data field. The placement id that you need to enter will be of your Polymorph ad placement which you can find on Polymorph console under Placements tab. [block:api-header] { "title": "2. Polymorph SDK and Adapter" } [/block] After you have setup Custom Event Class in MoPub, you need to import Polymorph SDK and Adapter into your mobile app project. <b>For Android</b> a. Import Polymorph SDK (aar) from https://github.com/picatcha/adsnative-sdk-android/blob/master/adsnative_sdk/adsnative-sdk-2.6.0.aar into your Android project's libs folder b. Add <code>compile(name:'adsnative-sdk-2.6.0', ext:'aar')</code> to your build.gradle c. Copy the <code>PolymorphNativeAdNetwork.java</code> from https://github.com/picatcha/adsnative-sdk-android/blob/master/networks/PolymorphNativeAdNetwork.java to <code>com.mopub.nativeads</code> package in your Android project