Add ad-support for adspirit adserver
Hello,
i'm not familliar with how this works here in order to request a feature, so im just adding it as an issue: I'd like to request support for ads from adspirit adservers. According to the AMP documentation, this is what you need:
The “normal” adserver output of a non-AMP page would look like:
So the js file for AMP should look like this: import {checkData} from '../src/3p';
/**
-
@param {!Window} global
-
@param {!Object} data */ export function adsense(global, data) { checkData(data, ['asm-params', 'asm-host']);
const i = document.createElement('ins'); i.setAttribute('data-asm-params', data['asm-params']); i.setAttribute('data-asm-host', data['asm-host']); i.setAttribute('class', 'asm_async_creative'); i.style.cssText = 'display:inline-block;text-align:left;'; global.document.getElementById('c').appendChild(i);
const s = document.createElement('script'); s.src = 'https://'+data[asm-host]+'/adasync.js'; global.document.body.appendChild(s); }
Example AMP tag:
To enable this adspirit adserver would have to contribute code & an implementation to the project - just as many other ad servers have done. You can read the 3P integration guidelines here and take a look at many of the other adserver implementations here
They would have to sign the contributing CLA & create a PR with their changes which will then be reviewed and merged.
The adspirit integration is available now. https://github.com/ampproject/amphtml/blob/master/ads/adspirit.md Closing this one out.