Campaign
How do you implement an AMP HTML ad unit?
Integrate AdUp ads into Accelerated Mobile Pages (AMP). Find out which attributes are required and how to correctly configure AMP HTML ads.

Overview
AdUp ads can also be served on Accelerated Mobile Pages (AMP).
A dedicated <amp-ad> tag is available for this purpose, allowing you to integrate ads directly into your AMP pages.
Since AMP-HTML ads are based on Responsive Ads technology, your ad unit should also be configured accordingly.
You can find further information about AMP on the official project portal:
Prerequisites
Before integrating an AMP-HTML ad unit, you will need:
a website set up in your publisher account
an ad unit
a valid Placement Key
an ad unit layout optimised for Responsive Ads
Integrating an AMP ad unit
Insert the following <amp-ad> tag at the position on your AMP page where the ad should appear.
<amp-ad type="aduptech"></amp-ad>
Then add the required attributes.
Required attributes
data-placementkey
The Placement Key uniquely identifies your ad unit.
data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"
width
Defines the width of the ad unit.
width="500"
height
Defines the height of the ad unit.
height="500"
Recommended attributes
layout
Defines how the ad unit behaves within your AMP page.
Available values:
fixedfilledfixed-heightresponsive
For most use cases, we recommend:
layout="responsive"
or
layout="filled"
data-query
Filters ads based on specific keywords.
Multiple keywords are separated by semicolons.
data-query="Italien;Flüge"
data-mincpc
Sets the minimum cost per click.
As a rule, the lower the value selected, the greater the number of potential campaigns.
data-mincpc="0.75"
data-pageurl
Passes the current URL of your page.
This parameter is particularly useful if the ad unit is located within nested iFrames and the URL cannot be determined automatically.
data-pageurl="https://www.example.com"
data-adtest
Activates test mode.
During test mode, neither impressions nor clicks are counted.
data-adtest="1"
data-gdpr
Passes the GDPR status manually.
Normally, this information is retrieved automatically via the AMP module <amp-consent>.
Available values:
Value | Meaning |
|---|---|
| GDPR applies |
| GDPR does not apply |
not set | Status unknown |
Example:
data-gdpr="1"
data-gdpr_consent
Passes the IAB Consent String manually.
This parameter is only required if privacy information cannot be provided automatically via <amp-consent>.
data-gdpr_consent="[CONSENT_STRING]"
Complete example
The following example shows a fully configured AMP-HTML ad unit.
Best practices
Use a responsive layout
Since AMP ads are based on responsive ad technology, you should preferably use the responsive layout.
Check the Placement Key
Make sure that each ad unit uses a valid Placement Key.
Use test mode
During implementation, it is advisable to use data-adtest to test the integration without recording impressions or clicks.
Pass privacy data automatically
If your AMP page uses <amp-consent>, the necessary privacy information is automatically transmitted to AdUp.
Manual submission is then not required.
Common sources of error
Missing Placement Key
Without a valid Placement Key, no ads can be served.
Incomplete size specifications
The width and height attributes are required for AMP ads.
Unsupported layout
Use only layout types supported by AMP.
Missing privacy information
If <amp-consent> is not used, data-gdpr and data-gdpr_consent should be passed manually.
