Roman Mönig
Roman Mönig

Reputation: 11

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

im trying to get around the composition of amps ad-compononent for doubleclick. To be used id needs to have the attribute data-slot defined, like in this (the only available) example:

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

My Question is, if anybody knows, how to generate that data-slot and/or what components are in it, because i don´t get it?

Thank you very much for your help!

additional links: https://github.com/ampproject/amphtml/blob/master/ads/doubleclick.md https://github.com/ampproject/amphtml/blob/master/ads/doubleclick.js

Upvotes: 0

Views: 1795

Answers (2)

Roman M&#246;nig
Roman M&#246;nig

Reputation: 11

Solved it:

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

Upvotes: 1

Daniel
Daniel

Reputation: 16

Here is the example of JS generated DFP code, you can easy find/google how to generate it. Look at this line:

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

data-slot is first defineSlot parameter from js code, so AMP code must be like this:

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

Upvotes: 0

Related Questions