amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Add ad-support for adspirit adserver

Open janwinkler opened this issue 10 years ago • 2 comments

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:

janwinkler avatar Feb 26 '16 10:02 janwinkler

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.

kashyapnitin avatar Mar 02 '16 12:03 kashyapnitin

The adspirit integration is available now. https://github.com/ampproject/amphtml/blob/master/ads/adspirit.md Closing this one out.

jasti avatar Sep 03 '16 15:09 jasti