{"_id":"5b440d397b7d6b0003ce911c","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"},"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":"569d8ad30306a10d00ce9a1f","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-07-10T01:34:49.205Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"[block:api-header]\n{\n  \"title\": \"1. Create Polymorph Adapter in DFP Yield Group\"\n}\n[/block]\nPolymorph Adapter on DFP is created as a Yield Partner under Yield Groups by making use of [**Custom event mediation**]. First create a new Yield Group with Ad Format as <code>Native</code> or <code>Banner</code> and Environment as <code>Mobile App</code> as shown below\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d55f01e-Screen_Shot_2018-07-09_at_6.12.53_PM.png\",\n        \"Screen Shot 2018-07-09 at 6.12.53 PM.png\",\n        1690,\n        1226,\n        \"#eff0f0\"\n      ],\n      \"caption\": \"Native Yield Group\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9807e78-Screen_Shot_2018-07-30_at_5.58.52_PM.png\",\n        \"Screen Shot 2018-07-30 at 5.58.52 PM.png\",\n        1684,\n        1222,\n        \"#efeff0\"\n      ],\n      \"caption\": \"Banner Yield Group\"\n    }\n  ]\n}\n[/block]\nNow add a <code>Yield Partner</code> under this group and choose [**Polymorph**] in the dropdown as shown below and choose [**Custom event mediation**] as the <code>Integration type</code>\n\n**Android**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/6b3fcce-Screen_Shot_2018-06-25_at_12.03.51_AM.png\",\n        \"Screen Shot 2018-06-25 at 12.03.51 AM.png\",\n        1186,\n        872,\n        \"#e4e4e4\"\n      ]\n    }\n  ]\n}\n[/block]\nClass name has to be the full qualified class name of the Polymorph Adapter - the path where you copy <code>PolymorphAdapter.java</code>file for Native ads or <code>PolymorphBannerAdapter.java</code> for Banner ads in Step 2 of [**Developer setup**](). You will have to co-ordinate with your developer to get the class path name in your Android application to complete this step.\n\n\n**iOS**\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/950deac-Screen_Shot_2018-07-18_at_6.03.37_PM.png\",\n        \"Screen Shot 2018-07-18 at 6.03.37 PM.png\",\n        1128,\n        878,\n        \"#e5e5e5\"\n      ],\n      \"caption\": \"DFP iOS Native Setup\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/4bd46b5-Screen_Shot_2018-07-26_at_4.51.14_PM.png\",\n        \"Screen Shot 2018-07-26 at 4.51.14 PM.png\",\n        1072,\n        868,\n        \"#e4e4e4\"\n      ],\n      \"caption\": \"DFP iOS Banner Setup\"\n    }\n  ]\n}\n[/block]\nThe Class name should be `PolymorphDFPNativeCustomEvent` or `PolymorphDFPBannerCustomEvent` which is the same class defined in the DFP folder [here](https://github.com/picatcha/adsnative-sdk-ios/tree/master/Header%20Bidding/DFP). If your developer decides to change it, then it needs to be updated here accordingly.\n\nNext let's set up rate and key-value targeting for the yield groups as explained in step 2\n[block:api-header]\n{\n  \"title\": \"2. Creating Yield groups for various price buckets\"\n}\n[/block]\nCreate multiple Yield Groups like you did in step 1 for various price buckets with each group containing only Polymorph Yield Partner. We recommend you to create yield groups for every **5 cents** price buckets, between the min and max range of the expected ecpm of your inventory. For example, if you believe your inventory is valued between $0.5 to $2.0 then we recommend you to setup line items, one with each of the following as the rate.\n\nYield Group 1 -> Polymorph : $0.50 as rate\nYield Group 2 -> Polymorph: $0.55 as rate\nYield Group 3 -> Polymorph: $0.60 as rate\nYield Group 4 -> Polymorph : $0.65 as rate\n....\nand so on upto $2.0\n\nPlease note that this is just a recommendation. You can create line items for every 10 cents or every 20 cents or any interval of your choice. But keeping it granular to 5 cent maximises the effectiveness of the header-bidding\n\n**Setting the rate of yield partners**\nSet the rate of each yield partner according to the granularity that you wanted. Since AdX by default competes with Polymorph yield partner, this will serve as a floor price for the demand from AdX. For instance, if you want to have an yield partner for $0.50 - set the <code>Default CPM</code> field of Polymorph yield partner to 0.50 as shown below:\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d15cf40-Screen_Shot_2018-07-01_at_11.36.06_PM.png\",\n        \"Screen Shot 2018-07-01 at 11.36.06 PM.png\",\n        1150,\n        1122,\n        \"#404444\"\n      ]\n    }\n  ]\n}\n[/block]\n**Create Key-value Targeting for yield groups**\nOnce you have created yield partners with various default rates, you need to create various ecpm key-values and target this to the corresponding yield groups. The key name should be <code>ecpm</code> and value has to be the rate which you want to have for this yield group. This step is extremely important to ensure that our client-server bidder is able to invoke the yield partner based on the ecpm. Refer https://support.google.com/dfp_premium/answer/188092?hl=en\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"Please note that the ecpm value you enter in the key-value targeting of the yield group is same as the <code>Default CPM</code> of the containing yield partner. Also please use two decimal places in key-value targeting or client server bidding wont work. For eg, 0.50, 1.00 etc\"\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/9240e51-Screen_Shot_2018-07-09_at_6.15.09_PM.png\",\n        \"Screen Shot 2018-07-09 at 6.15.09 PM.png\",\n        1662,\n        858,\n        \"#f3f3f3\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"adops-setup-in-app-header-bidding-into-dfp","type":"basic","title":"AdOps Setup - In-App Header Bidding into DFP"}

AdOps Setup - In-App Header Bidding into DFP


[block:api-header] { "title": "1. Create Polymorph Adapter in DFP Yield Group" } [/block] Polymorph Adapter on DFP is created as a Yield Partner under Yield Groups by making use of [**Custom event mediation**]. First create a new Yield Group with Ad Format as <code>Native</code> or <code>Banner</code> and Environment as <code>Mobile App</code> as shown below [block:image] { "images": [ { "image": [ "https://files.readme.io/d55f01e-Screen_Shot_2018-07-09_at_6.12.53_PM.png", "Screen Shot 2018-07-09 at 6.12.53 PM.png", 1690, 1226, "#eff0f0" ], "caption": "Native Yield Group" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/9807e78-Screen_Shot_2018-07-30_at_5.58.52_PM.png", "Screen Shot 2018-07-30 at 5.58.52 PM.png", 1684, 1222, "#efeff0" ], "caption": "Banner Yield Group" } ] } [/block] Now add a <code>Yield Partner</code> under this group and choose [**Polymorph**] in the dropdown as shown below and choose [**Custom event mediation**] as the <code>Integration type</code> **Android** [block:image] { "images": [ { "image": [ "https://files.readme.io/6b3fcce-Screen_Shot_2018-06-25_at_12.03.51_AM.png", "Screen Shot 2018-06-25 at 12.03.51 AM.png", 1186, 872, "#e4e4e4" ] } ] } [/block] Class name has to be the full qualified class name of the Polymorph Adapter - the path where you copy <code>PolymorphAdapter.java</code>file for Native ads or <code>PolymorphBannerAdapter.java</code> for Banner ads in Step 2 of [**Developer setup**](). You will have to co-ordinate with your developer to get the class path name in your Android application to complete this step. **iOS** [block:image] { "images": [ { "image": [ "https://files.readme.io/950deac-Screen_Shot_2018-07-18_at_6.03.37_PM.png", "Screen Shot 2018-07-18 at 6.03.37 PM.png", 1128, 878, "#e5e5e5" ], "caption": "DFP iOS Native Setup" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/4bd46b5-Screen_Shot_2018-07-26_at_4.51.14_PM.png", "Screen Shot 2018-07-26 at 4.51.14 PM.png", 1072, 868, "#e4e4e4" ], "caption": "DFP iOS Banner Setup" } ] } [/block] The Class name should be `PolymorphDFPNativeCustomEvent` or `PolymorphDFPBannerCustomEvent` which is the same class defined in the DFP folder [here](https://github.com/picatcha/adsnative-sdk-ios/tree/master/Header%20Bidding/DFP). If your developer decides to change it, then it needs to be updated here accordingly. Next let's set up rate and key-value targeting for the yield groups as explained in step 2 [block:api-header] { "title": "2. Creating Yield groups for various price buckets" } [/block] Create multiple Yield Groups like you did in step 1 for various price buckets with each group containing only Polymorph Yield Partner. We recommend you to create yield groups for every **5 cents** price buckets, between the min and max range of the expected ecpm of your inventory. For example, if you believe your inventory is valued between $0.5 to $2.0 then we recommend you to setup line items, one with each of the following as the rate. Yield Group 1 -> Polymorph : $0.50 as rate Yield Group 2 -> Polymorph: $0.55 as rate Yield Group 3 -> Polymorph: $0.60 as rate Yield Group 4 -> Polymorph : $0.65 as rate .... and so on upto $2.0 Please note that this is just a recommendation. You can create line items for every 10 cents or every 20 cents or any interval of your choice. But keeping it granular to 5 cent maximises the effectiveness of the header-bidding **Setting the rate of yield partners** Set the rate of each yield partner according to the granularity that you wanted. Since AdX by default competes with Polymorph yield partner, this will serve as a floor price for the demand from AdX. For instance, if you want to have an yield partner for $0.50 - set the <code>Default CPM</code> field of Polymorph yield partner to 0.50 as shown below: [block:image] { "images": [ { "image": [ "https://files.readme.io/d15cf40-Screen_Shot_2018-07-01_at_11.36.06_PM.png", "Screen Shot 2018-07-01 at 11.36.06 PM.png", 1150, 1122, "#404444" ] } ] } [/block] **Create Key-value Targeting for yield groups** Once you have created yield partners with various default rates, you need to create various ecpm key-values and target this to the corresponding yield groups. The key name should be <code>ecpm</code> and value has to be the rate which you want to have for this yield group. This step is extremely important to ensure that our client-server bidder is able to invoke the yield partner based on the ecpm. Refer https://support.google.com/dfp_premium/answer/188092?hl=en [block:callout] { "type": "info", "body": "Please note that the ecpm value you enter in the key-value targeting of the yield group is same as the <code>Default CPM</code> of the containing yield partner. Also please use two decimal places in key-value targeting or client server bidding wont work. For eg, 0.50, 1.00 etc" } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/9240e51-Screen_Shot_2018-07-09_at_6.15.09_PM.png", "Screen Shot 2018-07-09 at 6.15.09 PM.png", 1662, 858, "#f3f3f3" ] } ] } [/block]