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 block should also be configured accordingly.
For more information about AMP, visit the official project portal:
Prerequisites
Before embedding an AMP-HTML ad block, you require:
a created website in your publisher account
an ad block
a valid Placement Key
an ad block layout optimised for Responsive Ads
Integrating an AMP Ad Block
Insert the following <amp-ad> tag into your AMP page at the position 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 block.
data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"
width
Defines the width of the ad block.
width="500"
height
Defines the height of the ad block.
height="500"
Recommended Attributes
layout
Determines how the ad block 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 a semicolon.
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 block is located within nested iFrames and the URL cannot be determined automatically.
data-pageurl="https://www.example.com"
data-adtest
Enables 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 automatically retrieved 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 block.
Best Practices
Use a responsive layout
Since AMP ads are based on Responsive Ad technology, you should preferably use the responsive layout.
Verify the Placement Key
Make sure that every ad block 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 required privacy information is automatically transferred to AdUp.
Manual transfer is then not necessary.
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
Only use the layout types supported by AMP.
Missing privacy information
If <amp-consent> is not used, data-gdpr and data-gdpr_consent should be passed manually.
