AMP Documentation incl. Headerbidding ENGLISH

The acronym "AMP" stands for accelerated mobile pages.

Google introduced this project in order to ensure that the end user utilizes a minimal amount of mobile data as possible and at the same time to keep the webpage clean and load quickly.
Due to the nature of these pages including custom JS Code on these pages are restricted.

Please be aware, all examples on this page are not to be implemented on a live page.
Implementing a header bidder must be communicated with us, so we can setup and prepare the header bidder.

Overview

 

Glossary

Term

Description

Term

Description

Ad slots

Describes a space on a HTML page which gets filled with advertisements
depending on where the slot is placed on the page and which name is mapped to the slot.

Example: An ad slot gets placed on top or under the navigation. This slot will be declared as topmobile

Ad slot Size

An ad slot contains one or multiple format sizes.

example: the following format sizes will be mapped to the slot
topmobile: 300x250,320x150,320x100,320x75,320x50

Network ID

Every adserver from Google Ad Manager 360 has a unique ID.
The network ID is: 4444

Ad unit

The adunit declares the technical site in the ad server
example: m.amp_YOURSITENAME

MCM

Multiple Manage Inventory

Without MCM, the ad request from GAM will be blocked!

example:/4444,12345678/m.amp.test

Zone

The zone declares the category of your page. Through this the delivery can be targeted directly per category.
example: YOURSITENAME_homepage

Postfix

The postfix gets tagged onto the end of the set zone. This is necessary in order to book a specific campaign on a specific slot.


example: The AMP tag for the slot topmobile will get the postfix "_b1". (topmobile2 = "b2" topmobile3 = "_b3" etc...)

TAG ID

The TAG ID is used to map our header bidder to a specific ad unit.

Cookie Sync Tag

The cookie sync tag is necessary to synchronize User ID's which are mandatory for targeting.

amp-iframe

The amp-iframe component must be integrated for a clean communication between the header bidder and Admanager 360

Standard Setup:

In order to implement AMP Tags we recommend the following setup:

Best Practice

AMP recommends the first slot should be implemented 'below the fold', in this case the topmobile2 (_b2)

Ad slot

Format sizes

Ad slot

Format sizes

topmobile2 (b2)

300x600,320x480,300x252,300x250,320x150,320x100,320x75,320x50,37x32

topmobile3 (b3)

300x253,300x250,320x150,320x100,320x75,320x50,37x33

topmobile4 (b4)

300x254,300x250,320x150,320x100,320x75,320x50,37x34

stickyfooter

320x50,50x31

 

Placement recommendations for AMP Tags

we recommend the following placement tags for your AMP-Page:

Ad slot

Placement recommendation

Ad slot

Placement recommendation

topmobile2 (b2)

After the first picture/or Page introductary text

topmobile3 (b3)

Depending on the length of an article after every paragraph

topmobile4 (b4)

Depending on the length of an article after every paragraph

stickyfooter

On the bottom of the display edge

Here is an example for positioning the slots topmoible2(b2), topmobile3(b3) and stickyfooter.

Automatic Reloading ad slots

AMP offers the ability to automatically reload ad slots.This can be configured either
per slot or for all slots. When defining the refresh time, it is passed as seconds.

1 - Reload for single slots
In this example we will we will setup a stickyfooter with a reload set for 30 seconds

***___stickyfooter___*** <amp-ad ... type="doubleclick" data-enable-refresh="30" data-slot="/4444,MCM/m.amp_IHRSEITENNAME.de/ZONE_amp_stickyfooter" ... </amp-ad>

In order to set the refresh function for a single slot, the attribute 'data-enable-refresh'
must be set within the amp ad Tag. The value for this attribute can not be set under 30 seconds.

2 - Reload all slots (recommended)
Example for reloading all ad slots for 30 seconds.

<meta name="amp-ad-enable-refresh" content="doubleclick=30">

this code block has to be implemented in the <head> of your document.
We recommend setting the seconds to 30. In order to do so the value under content has to be set
to "doubleclick=30" and can be no smaller than 30.

Creating AMP Tags incl. header bidding

In the following example we will show how to setup the AMP header bidding tag and which properties
need to be changed and which don't.

Example for topmobile2

<amp-ad width=320 height=600 type="doubleclick" data-slot="/4444,MCM/m.amp_IHRSEITENNAME.de/ZONE_amp_b2" data-multi-size="300x600,320x480,300x252,300x250,320x150,320x100,320x75,320x50,37x32" data-multi-size-validation="false" rtc-config='{ "urls": [ "https://s2s.yieldlove-ad-serving.net/openrtb2/amp?tag_id=IHRETAGID&curl=CANONICAL_URL&w=ATTR(width)&h=ATTR(height)&ms=ATTR(data-multi-size)&gdpr_consent=CONSENT_STRING" ], "vendors": { "criteo": {"NETWORK_ID": 9896,"PUBLISHER_SUB_ID": "IHRSEITENNAME.de_amp_300x250_1"} }, "timeoutMillis": 999, "sendRegardlessOfConsentState": true }' json='{"targeting": {"beacon":"no", "yieldlove_meta": "pid:IHRETAGID.sb:f","kw": "amp","keywords": ["b2", "amp"],"adslot": "topmobile2","af": ["moad2x1", "moad3x1", "moad4x1", "moad6x1", "mmrec", "mhpad", "lainl"],"as": "topmobile2", "flag": "inint"}}'> </amp-ad>

There are many different amp tags. When we describe an amp tag, than we are talking about the tag that delivers an advertisement -> <amd-ad...></amp-ad>

Every configuration only needs to be changed within the open AMP tag.

In the next section we will explain which properties need to be filled in and which need to stay unchanged.

width / height

the opening amp tag begins with the width and height. In order to fill these properties first you will need to find out which sizes are needed for your AMP tag. In this example we are using the topmobile2.

Per default topmobile2 has the following sizes: 300x252,  300x250, 320x150, 320x100, 320x75, 320x50

The first step is to find the size with the largest WIDTH. In this case it is 320. This value will be set as the width property in our AMP tag.

The same goes for our height. We need to find the largest HEIGHT value from the sizes.
In this case the value is 252 this needs to be set as the property under height.

type

In this case the "type" declares the service provider "doubleclick". This Property should NOT be changed.

data-slot / Ad unit

The data slot is mapped to the ad unit ID. We will provide the ID, this ID has to be included in each AMP tag.

MCM: After the Network ID for our Google Ad Manger ID "4444," the MCM ID should be inserted. Please ensure that this value is separated by a comma. We will provide you with the necessary ID.

Please be aware you will need to replace the "ZONE" with the proper zone for your current page.

Example: /artikel or /rest

data-multi-size / sizes

Example for the slot topmobile:

As stated above, each ad slot can contain multiple sizes. Expected are our default sizes for the corresponding ad slot.
If for example you wish to not include the format mobile rectangle in the ad slot topmobile2
then you must remove the size: 300x250 from the line: data-multi-size.

data-multi-size-validation

Example for the slot topmobile:

This property must ALWAYS have the value false, or else there will be complications using multi-sizes.

rtc-config 

Example for the slot topmobile:

Please replace tag_id:IHRETAGID and PUBLISHER_SUB_ID: IHRSEITENNAME.de_amp_300x250_1 . You will receive the proper entries from us.

json 

Example for the slot topmobile:

The property "json" contains per default our defined keywords. These CAN NOT be changed.
Exception here is "pid". Please enter the proper tag id you have received from us.

If further keywords are required please discuss these with your Contact Person.

Characteristics for the ad stickyfooter

The implementation for the ad slot stickyfooter has a few specific settings compared to the other AMP tags.

The amp-ad tag needs to be wrapped with a tag called amp-sticky-ad with the property layout="nodisplay".

In order to make this slot sticky you will need to integrate a seperate script in the <head> of your page:

Example Template for topmobile2, topmobile3, topmpobile4 and topmobile5 incl. header bidding - optional topmobile6, topmobile7 and topmobile8

What needs to be changed? (short version)

Snippet from the Template

In Orange the lines that need to be replaced

Snippet from the Template

In Orange the lines that need to be replaced

data-slot="/4444/m.amp_IHRSEITENNAME.de/ZONE_amp_sticky

data-slot="/4444,MCM/m.amp_IHRSEITENNAME.de/ZONE_amp_sticky

"urls": [ "https://s2s.yieldlove-ad-serving.net/openrtb2/amp?tag_id=IHRETAGID&

"urls": [ "https://s2s.yieldlove-ad-serving.net/openrtb2/amp?tag_id=IHRETAGID&

"PUBLISHER_SUB_ID": "IHRSEITENNAME.de_amp_320x50_1"}

"PUBLISHER_SUB_ID": "IHRSEITENNAME.de_amp_320x50_1"} 

"pid:IHRETAGID.sb:f",

"pid:IHRETAGID.sb:f",

Cookie Sync Iframe

The cookie Sync tag is necessary for the SSPs to synchronize the user id's.
User IDs are required for targeting.

AMP Components

Check if the amp-iframe component is already implemented in your AMP page.

If not, place this unaltered AMP-iFrame component in the <head> of your AMP page.

Consent Managment Platform (CMP)

The consent from the user is needed per technical service provider in order to utilize their personal data.
Service providers are categorized depending on which data the use. (I.e create a personalized ads profile)

Integrating the Sourcepoint CMP-Tool on AMP websites

In case you do not have a CMP Provider, we can support you with our provider Sourcepoint and their CMP
solution.

If you decide to use our Sourcepoint implementation please contact us and read the following documentation:

Integrating the AMP-Consent tag on your website
https://documentation.sourcepoint.com/web-implementation/amp-implementation-section

In order to fill out the AMP-Consent-Tag with the proper data, which is specifically setup in Sourcepoint for your page, please use the Ids we send to you. You will receive these from your Publisher Account Manager (PAM).

Creating a CNAME (needed for the AMP Consent-Tag)
https://documentation.sourcepoint.com/web-implementation/amp-implementation-section/amp-implementation-tcf-version-2-with-single-cname#setting-up-the-cname-dns-record

Test environment

Please integrate the CMP Tool on a test page first before it gets released to production.
After our technical team has tested and approved the integration you can go live with the CMP.