Campaign

How do you implement an AMP HTML ad unit?

Author

Tom Wendt

30 Apr 2026

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 delivered on Accelerated Mobile Pages (AMP).

A special <amp-ad> tag is available for this purpose, with which you can integrate ads directly into your AMP pages.

Since AMP HTML ads are based on the technology of Responsive Ads, your ad block should also be configured accordingly.

For more information on AMP, please visit the official project portal:

https://amp.dev

Prerequisites

Before you integrate an AMP HTML ad block, you will need:

  • a created website in your publisher account

  • an ad block

  • a valid Placement Key

  • an ad block layout optimised for Responsive Ads

Integrating the AMP ad block

Insert the following <amp-ad> tag into your AMP page in the position where the ad is to 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:

  • fixed

  • filled

  • fixed-height

  • responsive

For most use cases, we recommend:

layout="responsive"

or

layout="filled"

data-query

Filters ads based on specific keywords.

Multiple keywords are separated by semicolor.

data-query="Italien;Flüge"

data-mincpc

Sets the minimum price per click.

The lower the value is set, the higher the number of possible campaigns usually is.

data-mincpc="0.75"

data-pageurl

Passes the current URL of your page.

This parameter is particularly useful if the ad block is within nested iFrames and the URL cannot be determined automatically.

data-pageurl="https://www.example.com"

data-adtest

Activates test mode.

No impressions or clicks are counted in test mode.

data-adtest="1"

data-gdpr

Passes the GDPR status manually.

Normally, this information is transferred automatically via the <amp-consent> AMP module.

Available values:

Value

Meaning

1

GDPR applies

0

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 needed if the data protection information cannot be automatically provided via <amp-consent>.

data-gdpr_consent="[CONSENT_STRING]"

Complete example

The following example shows a fully configured AMP HTML ad block.

<amp-ad    type="aduptech"    width="300"    height="250"    layout="responsive"    data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"    data-query="Reisen;Italien"    data-mincpc="0.75"    data-adtest="1"></amp-ad>
<amp-ad    type="aduptech"    width="300"    height="250"    layout="responsive"    data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"    data-query="Reisen;Italien"    data-mincpc="0.75"    data-adtest="1"></amp-ad>
<amp-ad    type="aduptech"    width="300"    height="250"    layout="responsive"    data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"    data-query="Reisen;Italien"    data-mincpc="0.75"    data-adtest="1"></amp-ad>

Best practices

Use responsive layout

Since AMP ads are based on responsive ad technology, you should ideally use the responsive layout.

Check Placement Key

Make sure that every ad block uses a valid Placement Key.

Use test mode

During implementation, it is recommended to use data-adtest to test the integration without recording impressions or clicks.

Pass data protection automatically

If your AMP page uses <amp-consent>, the required data protection information is automatically transmitted to AdUp.

Manual transfer is then not necessary.

Common sources of error

Missing Placement Key

Without a valid Placement Key, ads cannot be delivered.

Incomplete size specifications

The attributes width and height are required for AMP ads.

Unsupported layout

Only use the layout types supported by AMP.

Missing data protection information

If <amp-consent> is not used, data-gdpr and data-gdpr_consent should be passed manually.