{"_id":"57c086cddbc60929009ad99e","user":"56f305ac92cce10e00eaf0d9","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"},"parentDoc":null,"__v":0,"category":{"_id":"55e89569cdbb8a350096df9c","__v":14,"project":"5429beef1163360800ed31fa","pages":["55e896ac4535442d00ccacf3","55e8b205f0f1850d00d24a59","55e8b243720fde1700659a0e","55e8b4258c0c601700f978e0","55e8b5537cdf7119002d2e3a","55e8b5737cdf7119002d2e3c","55e8b5863fef5017000dbd9f","55e8b59ef0f1850d00d24a63","563b50349e3f2225009fd296","5640d891d4b2e00d00bb3d48","564cfd4e2248461700bd4021","5660e89689e82f0d008f6832","5668d3428ff3da0d0079092f","56abb944f25f160d00e17f40"],"version":"5429beef1163360800ed31fd","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-09-03T18:46:01.692Z","from_sync":false,"order":1,"slug":"sdk-integrations","title":"Integrating for Web"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-26T18:13:33.839Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":13,"body":"The [Accelerated Mobile Pages](https://www.ampproject.org/) (AMP) Project is an open source initiative that helps publishers in creating mobile optimized content once and have it load instantly everywhere.\n\nSince AMP restricts the way you show third-party content publishers need to load ads and other widgets as per guidelines setup in the AMP project. AdsNative has built the AMP adapter for ads so publishers can load native ads within AMP optimized pages. \n\n**Note**: AdsNative integration for AMP only works for [standard web based](http://dev.adsnative.com/docs/standard-web-integration) javascript SDK integration.\n\nPlease refer to following steps for AdsNative adapter integration for AMP. \n\n**Step 1**: Ensure that your page is AMP compatible. AMP validation guidelines are [here](https://www.ampproject.org/docs/guides/validate.html). The following script should be on the page. \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<script\\n async \\n custom-element=\\\"amp-ad\\\"\\n src=\\\"https://cdn.ampproject.org/v0/amp-ad-0.1.js\\\">\\n</script>\\n<script \\n async \\n src=\\\"https://cdn.ampproject.org/v0.js\\\">\\n</script>\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]\n**Step 2**: Copy & paste this code into your AMP compatible page. The placement ID can be found after you log into your account.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<amp-ad width=300 height=250\\n type=”adsnative\\\"\\n data-anapiid=”Your placement ID”>\\n    <div>Place Holder</div>\\n</amp-ad>\",\n      \"language\": \"html\"\n    }\n  ]\n}\n[/block]\nSupported parameters:\n\n**Required**\n\nwidth: required by amp\nheight: required by amp\ndata-anapiid: the api id may be used instead of network and widget id\ndata-annid: the network id must be paired with widget id\ndata-anwid: the widget id must be paired with network id\n\n**Optional**\n\ndata-anapiid: the api id\ndata-anwid: the widget id\ndata-antid: the template id\ndata-ancat: a comma separated list of categories\ndata-ankv: a list of key value pairs in the format \"key1:value1, key2:value2\"","excerpt":"AdsNative supports \"Accelerated Mobile Pages\" project (AMP), wherein you can serve ads appropriately.","slug":"amp-integration","type":"basic","title":"AMP Integration"}

AMP Integration

AdsNative supports "Accelerated Mobile Pages" project (AMP), wherein you can serve ads appropriately.

The [Accelerated Mobile Pages](https://www.ampproject.org/) (AMP) Project is an open source initiative that helps publishers in creating mobile optimized content once and have it load instantly everywhere. Since AMP restricts the way you show third-party content publishers need to load ads and other widgets as per guidelines setup in the AMP project. AdsNative has built the AMP adapter for ads so publishers can load native ads within AMP optimized pages. **Note**: AdsNative integration for AMP only works for [standard web based](http://dev.adsnative.com/docs/standard-web-integration) javascript SDK integration. Please refer to following steps for AdsNative adapter integration for AMP. **Step 1**: Ensure that your page is AMP compatible. AMP validation guidelines are [here](https://www.ampproject.org/docs/guides/validate.html). The following script should be on the page. [block:code] { "codes": [ { "code": "<script\n async \n custom-element=\"amp-ad\"\n src=\"https://cdn.ampproject.org/v0/amp-ad-0.1.js\">\n</script>\n<script \n async \n src=\"https://cdn.ampproject.org/v0.js\">\n</script>", "language": "javascript" } ] } [/block] **Step 2**: Copy & paste this code into your AMP compatible page. The placement ID can be found after you log into your account. [block:code] { "codes": [ { "code": "<amp-ad width=300 height=250\n type=”adsnative\"\n data-anapiid=”Your placement ID”>\n <div>Place Holder</div>\n</amp-ad>", "language": "html" } ] } [/block] Supported parameters: **Required** width: required by amp height: required by amp data-anapiid: the api id may be used instead of network and widget id data-annid: the network id must be paired with widget id data-anwid: the widget id must be paired with network id **Optional** data-anapiid: the api id data-anwid: the widget id data-antid: the template id data-ancat: a comma separated list of categories data-ankv: a list of key value pairs in the format "key1:value1, key2:value2"