<amp-ad width=320 height=50
type="doubleclick"
data-slot="/4119129/mobile_ad_banner">
</amp-ad>
<amp-ad width=320 height=50
type="doubleclick"
data-slot="/4119129/mobile_ad_banner"
json='{"targeting":{"sport":["rugby","cricket"]},"categoryExclusions":["health"],"tagForChildDirectedTreatment":1}'>
</amp-ad>
For semantics of configuration, please see ad network documentation.
By default the ad size is based on the width
and height
attributes of the amp-ad
tag. In order to explicitly request different ad dimensions from those values, pass the attributes data-override-width
and data-override-height
to the ad.
Example:
<amp-ad width=320 height=50
data-override-width=111
data-override-height=222
type="doubleclick"
data-slot="/4119129/mobile_ad_banner">
</amp-ad>
data-slot
Supported via json
attribute:
categoryExclusions
cookieOptions
tagForChildDirectedTreatment
targeting
useSameDomainRenderingUntilDeprecated
An experiment to use the higher performance GLADE tag in place of the DoubleClick GPT tag causes the ad to render in a second cross domain iframe within the outer AMP iframe. This prevents ads from accessing the iframe sandbox information and methods which are provided by the AMP runtime. Until this API is available to work in the second level iframe, publishers can opt out of this experiment by including "useSameDomainRenderingUntilDeprecated": 1 as a json attribute. This attribute will be deprecated by the end of June 2016, when the GLADE tag will become the default, and all ads will always be rendered inside a second cross domain iframe
Example:
<amp-ad width=320 height=50
type="doubleclick"
data-slot="/4119129/mobile_ad_banner"
json='{"useSameDomainRenderingUntilDeprecated":1}'>
</amp-ad>
- Multisize requests. Since the size of the adslot needs to be defined prior to the ad request, multisize requests are not supported.
- Guaranteed Roadblocks. Non-guaranteed roadblocks (As many as possible, One or More) delivery is supported
- Interstitials
- Expandables. Although expandables on interaction/click is a format that is work in progress.
- Flash
- Anchor Ads / Adhesion Units
- Creatives served over HTTP.
This website has a list of implementation examples with source code that showcase DFP features.