/
Ad Integration - AMP

Ad Integration - AMP

The following script must be inserted in the <head> of the AMP page:

< script   async  custom-element = "amp-ad"   src = "https://cdn.ampproject.org/v0/amp-ad-0.1.js" ></ script >

Insert the following code snippet at the desired location for ad integration:

< amp-ad   width = 336   height = 600
type = "doubleclick"
data-slot = "/AdserverID/WebPageKey/Channel/ContentTyp/AdPosition"
data-override-width = "336"
data-override-height = "600"
data-multi-size = "300x600,336x280,300x250,300x150,300x100,300x75,300x50,320x250,320x150,320x100,320x75,320x50"
data-multi-size-validation = "false"
json = '{"targeting":{"ad_position":"<pass ad position value from data-slot>","sitename":"<pass WebpageKey value from data-slot>","channel":"<pass channel value from data-slot>","contenttype":"<pass ContentType value from data-slot>","adkeyword":"<custom value>","pageid":"<pass unique page id >"}}' >
</ amp-ad >

data-override-height="xxx" reflects the maximum height from the available sizes of data-multi-size=. Here in this example, it is 600.
data-multi-size will select the desired AdSizes for delivery (any size within the dimensions defined in amp-ad width/height will work).
data-slot here the following scheme applies "/AdserverID/WebPageKey/Channel/ContentType/AdPosition

AdserverID is a fix value and will be provided from the ATF team.

WebPageKey is a fix value and will be provided from the ATF team.

Channel the current channel is to be transmitted.

ContentType this parameter is predefined. A publisher can select out of four options. You use it to describe the type of a subpage which the user has visited.

  • homepage

  • channel

  • article

  • gallery

AdPosition is the name of the ad slot. You have to count up the ad slots and start with 1. It’s predefined and following values are possible

  • picount (Only for picount slot)

  • top

  • content

  • footer

Example count up: We are working only with one top slot. top slot is the first ad slot on the page. You have to enter in that case top_1. We implement more than one content slots (all other slots after the first ad slot) and count only till 3 all other get x (content_1, content_2, content_3, content_x, content_x, content_x, etc.)
picount will not counted it’s always picount

Example: /40748507/sty_ell_amp/fashion/channel/top_1

Via json targeting values can be passed. The named key values are pre defined and have to be passed always '{"targeting":{"ad_position":"<pass ad position value from data-slot>","sitename":"<pass WebpageKey value from data-slot>","channel":"<pass channel value from data-slot>","contenttype":"<pass ContentType value from data-slot>","adkeyword":"<custom value>","pageid":"<pass unique page id >"}}'  . They are needed for reports and campaign booking purpuses.
KeyValues can be passed with the notation "Key": "Value". The KeyValues are separated with ,.

Example:  '{"targeting":{"ad_position":"top_1", "meinKey":"meinValue"}}'

If possible provide us the sub navigation as well, please.
Please add it in json: "subchannel":"<pass subchannel value>"

Do you build a kind of topic clusters/categories, like lipstick, hair, watch, etc. and can pass it to us?
Please add in json:
"themencluster":"<pass themencluster value e.g. lipstick>"

 Please consider our key value limitations:

  • All letters must be written in lower case

  • Alphanumeric strings are allowed

  • Write out umlauts (ae, oe, etc.)

  • Replace spaces with " - ".

  • max. letter length per key : 20

  • max. letter length per value : 40

 

Related content