{"_id":"5ab4c0606a7dfe001c235fda","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":"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"},"user":"59521bff71e9dd0015d8e05e","githubsync":"","__v":0,"parentDoc":null,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2018-03-23T08:52:48.013Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":16,"body":"Configure a 3rd Party Network tag campaign in DFP. Use the below Polymorph tag to set up a creative under the 3rd Party Network tag campaign. This tag will fetch and render an Ad from Polymorph exchange. In case of no-fill, the tag will signal DFP accordingly so the DFP SDK will waterfall to other partners down the line.\n\nYou just need to replace [PLACEMENT_ID] with your actual placement ID created on Polymorph. Placement ID can be fetched from Polymorph UI as shown here: https://dev.getpolymorph.com/docs/publisher-faqs#4-how-to-get-placement-id-\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<!DOCTYPE html>\\n<html>\\n<head>\\n<!-- COPY FROM HERE - Polymorph : JS Tag START -->\\n<script> \\nvar adsnativetag = adsnativetag || {};\\nadsnativetag.cmdQ = adsnativetag.cmdQ || [];\\nadsnativetag.cmdQ.push(function(){\\nadsnativetag.updateConfig({\\n});\\n});\\n</script>\\n<script async='async' type='text/javascript' src='//static.affle.com/static/js/render.v2.js'></script>\\n<script>\\nadsnativetag.cmdQ.push(function(){\\n//define ad unit\\nwindow.demoAdUnit1 = adsnativetag.defineAdUnit({\\napiKey: '<REPLACE_POLYMORPH_PLACEMENT_ID>',// https://dev.getpolymorph.com/docs/publisher-faqs#4-how-to-get-placement-id-\\nuuid: '%%ADVERTISING_IDENTIFIER_PLAIN%%',\\napp: true//Parameter set to true to set renderjs inside mobile app\\n});\\nadsnativetag.requestAds();\\n});\\n</script>\\n</head>\\n<body>\\n<div id='div-an-ad-1'>\\n<script type='text/javascript'>\\nadsnativetag.cmdQ.push(function() { var display_status = adsnativetag.displayAdUnit(demoAdUnit1, 'div-an-ad-1'); });\\n</script>\\n</div>\\n <!-- COPY TILL HERE - Polymorph : JS Tag END -->\\n  \\n <!-- Make sure you have replaced <POLYMORPH_PLACEMENT_ID> with your own values before setting it up in DFP -->\\n</body>\\n</html>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\n`%%ADVERTISING_IDENTIFIER_PLAIN%%` The macro allows in-app publishers to send a resettable mobile advertising ID (IDFA for iOS, AdID for Android, RIDA for Roku, and tvOS for Apple TV) to advertising partners for serving interest-based ads.","excerpt":"","slug":"setup-polymorph-js-network-tag-in-dfp","type":"basic","title":"Setup Polymorph JS Network Tag in DFP"}

Setup Polymorph JS Network Tag in DFP


Configure a 3rd Party Network tag campaign in DFP. Use the below Polymorph tag to set up a creative under the 3rd Party Network tag campaign. This tag will fetch and render an Ad from Polymorph exchange. In case of no-fill, the tag will signal DFP accordingly so the DFP SDK will waterfall to other partners down the line. You just need to replace [PLACEMENT_ID] with your actual placement ID created on Polymorph. Placement ID can be fetched from Polymorph UI as shown here: https://dev.getpolymorph.com/docs/publisher-faqs#4-how-to-get-placement-id- [block:code] { "codes": [ { "code": "<!DOCTYPE html>\n<html>\n<head>\n<!-- COPY FROM HERE - Polymorph : JS Tag START -->\n<script> \nvar adsnativetag = adsnativetag || {};\nadsnativetag.cmdQ = adsnativetag.cmdQ || [];\nadsnativetag.cmdQ.push(function(){\nadsnativetag.updateConfig({\n});\n});\n</script>\n<script async='async' type='text/javascript' src='//static.affle.com/static/js/render.v2.js'></script>\n<script>\nadsnativetag.cmdQ.push(function(){\n//define ad unit\nwindow.demoAdUnit1 = adsnativetag.defineAdUnit({\napiKey: '<REPLACE_POLYMORPH_PLACEMENT_ID>',// https://dev.getpolymorph.com/docs/publisher-faqs#4-how-to-get-placement-id-\nuuid: '%%ADVERTISING_IDENTIFIER_PLAIN%%',\napp: true//Parameter set to true to set renderjs inside mobile app\n});\nadsnativetag.requestAds();\n});\n</script>\n</head>\n<body>\n<div id='div-an-ad-1'>\n<script type='text/javascript'>\nadsnativetag.cmdQ.push(function() { var display_status = adsnativetag.displayAdUnit(demoAdUnit1, 'div-an-ad-1'); });\n</script>\n</div>\n <!-- COPY TILL HERE - Polymorph : JS Tag END -->\n \n <!-- Make sure you have replaced <POLYMORPH_PLACEMENT_ID> with your own values before setting it up in DFP -->\n</body>\n</html>", "language": "html" } ] } [/block] `%%ADVERTISING_IDENTIFIER_PLAIN%%` The macro allows in-app publishers to send a resettable mobile advertising ID (IDFA for iOS, AdID for Android, RIDA for Roku, and tvOS for Apple TV) to advertising partners for serving interest-based ads.