diff --git a/ads/_config.js b/ads/_config.js index 560ba24f2e9f..e8a4a49c78de 100755 --- a/ads/_config.js +++ b/ads/_config.js @@ -66,6 +66,10 @@ const adConfig = jsonConfiguration({ renderStartImplemented: true, }, + 'a1ads': { + renderStartImplemented: true, + }, + 'a8': { prefetch: 'https://statics.a8.net/amp/ad.js', renderStartImplemented: true, diff --git a/ads/vendors/a1ads.js b/ads/vendors/a1ads.js new file mode 100644 index 000000000000..d1c7028e9d0c --- /dev/null +++ b/ads/vendors/a1ads.js @@ -0,0 +1,26 @@ +import {validateData, writeScript} from '#3p/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function a1ads(global, data) { + validateData(data, ['adhost', 'a1path', 'adtag', 'sitepage', 'pos'], ['query']); + + let url = + 'https://' + + encodeURIComponent(data.adhost) + + '/' + + data.a1path + + '/' + + data.adtag + + '/' + + data.sitepage + + '@' + + data.pos; + + if (data.query) { + url = url + '?' + data.query; + } + writeScript(global, url); +} diff --git a/ads/vendors/a1ads.md b/ads/vendors/a1ads.md new file mode 100644 index 000000000000..04c054d49d43 --- /dev/null +++ b/ads/vendors/a1ads.md @@ -0,0 +1,36 @@ +# A1 + +## Examples +### Single ad +``` + + +``` + + +## Configuration + +### Required parameters +`adhost`: Server Hostname start with protocol. + +`a1path`: Path of adtag + +`adtag`: ads tag name + +`sitepage`: Sitepage configured for this ad spot. + +`pos`: Position for the this ad spot. + + +### Optional parameters +`query`: Query parameter to be sent with request. Keywords and keynames, taxonomy etc.