加速移动页面 (Amp):用于双击的 amp-ad

Accellerated Mobile Pages (Amp) : amp-ad for doubleclick

我正在尝试解决用于双击的 amps 广告组件的构成。 要使用 id 需要定义属性数据槽,就像在这个(唯一可用的)示例中一样:

 <amp-ad width=320 height=50
 type="doubleclick"
 data-slot="/4119129/mobile_ad_banner">
</amp-ad>]]>

我的问题是,如果有人知道如何生成该数据槽 and/or 里面有哪些组件,因为我不明白?

非常感谢您的帮助!

附加链接:https://github.com/ampproject/amphtml/blob/master/ads/doubleclick.md https://github.com/ampproject/amphtml/blob/master/ads/doubleclick.js

Here is the example的JS生成DFP代码,你可以很容易find/google如何生成它。 看这一行:

googletag.defineSlot("/1234/travel/asia/food", [728, 90], "div-gpt-ad-123456789-0")

data-slot是第一个来自js代码的defineSlot参数, 所以 AMP 代码必须是这样的:

<amp-ad width=320 height=50
 type="doubleclick"
 data-slot="/1234/travel/asia/food">
</amp-ad>

已解决:

<amp-ad width=300 height=250
type="doubleclick"
data-slot="/advertUrl/advertZone">
json='{"targeting":{insert targeting here}
</amp-ad>