diff --git a/3p/integration.js b/3p/integration.js index 9d20091a2295..ce1b9504fd0f 100644 --- a/3p/integration.js +++ b/3p/integration.js @@ -30,6 +30,7 @@ import {adreactor} from '../ads/adreactor'; import {adsense} from '../ads/adsense'; import {adtech} from '../ads/adtech'; import {plista} from '../ads/plista'; +import {criteo} from '../ads/criteo'; import {doubleclick} from '../ads/doubleclick'; import {dotandads} from '../ads/dotandads'; import {endsWith} from '../src/string'; @@ -64,6 +65,7 @@ register('adreactor', adreactor); register('adsense', adsense); register('adtech', adtech); register('plista', plista); +register('criteo', criteo); register('doubleclick', doubleclick); register('flite', flite); register('taboola', taboola); diff --git a/ads/_config.js b/ads/_config.js index aa5cfac9ad9f..dfdef89338e2 100644 --- a/ads/_config.js +++ b/ads/_config.js @@ -28,6 +28,7 @@ export const adPrefetch = { ], a9: 'https://c.amazon-adsystem.com/aax2/assoc.js', adsense: 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js', + criteo: 'https://static.criteo.net/js/ld/publishertag.js', dotandads: 'https://amp.ad.dotandad.com/dotandadsAmp.js', mediaimpact: 'https://ec-ns.sascdn.com/diff/251/divscripte/amp.js', smartadserver: 'https://ec-ns.sascdn.com/diff/js/smart.js', @@ -58,6 +59,9 @@ export const adPreconnect = { 'https://a.teads.tv', 'https://t.teads.tv', ], + criteo: [ + 'https://cas.criteo.com', + ], doubleclick: [ 'https://partner.googleadservices.com', 'https://securepubads.g.doubleclick.net', diff --git a/ads/criteo.js b/ads/criteo.js new file mode 100644 index 000000000000..9c68bd269bb3 --- /dev/null +++ b/ads/criteo.js @@ -0,0 +1,27 @@ +/** + * Copyright 2015 The AMP HTML Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS-IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import {loadScript} from '../src/3p'; + +/** + * @param {!Window} global + * @param {!Object} data + */ +export function criteo(global, data) { + loadScript(global, 'https://static.criteo.net/js/ld/publishertag.js', () => { + Criteo.DisplayAd({'zoneid': data.zone}); + }); +} diff --git a/ads/criteo.md b/ads/criteo.md new file mode 100644 index 000000000000..77b769840c2d --- /dev/null +++ b/ads/criteo.md @@ -0,0 +1,39 @@ + + +# Criteo + +## Example + +```html + + +``` + +## Ad size + +The ad size is based on the setup of your Criteo zone. The `width` and `height` attributes of the `amp-ad` tag should match that. + + +## Configuration + +For configuration details and to generate your tags, please refer to [your publisher account](https://publishers.criteo.com) or contact publishers@criteo.com. + +Supported parameters: + +- `data-zone`: your Criteo zone identifier. diff --git a/builtins/amp-ad.md b/builtins/amp-ad.md index ab37c5b2897b..55e80ded806c 100644 --- a/builtins/amp-ad.md +++ b/builtins/amp-ad.md @@ -97,6 +97,7 @@ resources in AMP. It requires a `type` argument that select what ad network is d - [AdReactor](../ads/adreactor.md) - [AdSense](../ads/adsense.md) - [AdTech](../ads/adtech.md) +- [Criteo](../ads/criteo.md) - [Dot and Media](../ads/dotandads.md) - [Doubleclick](../ads/doubleclick.md) - [Flite](../ads/flite.md) diff --git a/docs/include_features.md b/docs/include_features.md index eb95e5151511..b0c6aec2911d 100644 --- a/docs/include_features.md +++ b/docs/include_features.md @@ -278,6 +278,7 @@ The following ad networks are supported in AMP HTML pages: - [AdReactor](../ads/adreactor.md) - [AdSense](../ads/adsense.md) - [AdTech](../ads/adtech.md) +- [Criteo](../ads/criteo.md) - [Doubleclick](../ads/doubleclick.md) ## Display an ad diff --git a/examples/ads.amp.html b/examples/ads.amp.html index acc6fb4db6db..2d6ce8fb697e 100644 --- a/examples/ads.amp.html +++ b/examples/ads.amp.html @@ -138,6 +138,12 @@

Challenging ad.

data-slot="/35096353/amptesting/badvideoad"> +

Criteo

+ + +

Flite

{ expect(registrations).to.include.key('adsense'); expect(registrations).to.include.key('adtech'); expect(registrations).to.include.key('adreactor'); + expect(registrations).to.include.key('criteo'); expect(registrations).to.include.key('doubleclick'); expect(registrations).to.include.key('flite'); expect(registrations).to.include.key('twitter');