Campaign
Examples of installing AMP-HTML ad units

Author
Tom Wendt
30 Apr 2026
Discover practical examples of integrating AMP HTML ad units – from fixed banner formats to fully responsive layouts.

Overview
In this article you will find various examples for integrating AMP-HTML ad units.
If you have not yet carried out the basic setup, we recommend reading the article "How do you integrate an AMP-HTML ad unit?" first.
Fixed-size ad unit
Use the fixed layout if your ad unit should always be displayed with a fixed width and height.
<amp-ad type="aduptech" layout="fixed" width="500" height="200" data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"></amp-ad>
Suitable for:
classic banner formats
desktop placements
fixed ad spaces
Dynamically sized ad unit
With the fill layout, the ad unit adapts completely to its surrounding container.
Define container
<style amp-custom>#parent { width: 350px; height: 300px; position: relative;}</style>
Integrate ad unit
<div id="parent"> <amp-ad type="aduptech" layout="fill" data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"> </amp-ad></div>
Suitable for:
flexible layouts
dynamic containers
modern websites
Fixed-height ad unit
With fixed-height, the height of the ad unit remains constant while the width automatically adapts to the available space.
<amp-ad type="aduptech" layout="fixed-height" height="100" data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"></amp-ad>
Suitable for:
horizontal banners
header and footer placements
responsive websites
Ad unit with fixed aspect ratio
With responsive, the ad unit adapts flexibly to the available space while maintaining the defined aspect ratio.
In the following example, a ratio of 16:9 is used.
<amp-ad type="aduptech" layout="responsive" width="16" height="9" data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1"></amp-ad>
This layout is particularly suitable for:
responsive websites
mobile devices
modern content layouts
When should you use which layout?
Layout | Recommendation |
|---|---|
| For fixed-size banners |
| When the ad should adapt completely to the container |
| For banners with a fixed height and variable width |
| For responsive layouts with a fixed aspect ratio |
Best Practices
Prefer responsive layout
For most modern websites, we recommend the responsive layout, as ads adapt flexibly to different screen sizes.
Pay attention to container size
Layouts like fill require a container with defined dimensions.
If this is missing, the ad cannot be displayed correctly.
Test placements
Check each ad placement on:
Desktop
Tablet
Smartphone
This ensures that ads are displayed correctly on all devices.
Use test mode
During implementation, use the parameter data-adtest to test ads without tracking impressions or clicks.
Common Sources of Error
Missing container size for fill
With the fill layout, the parent container must have a defined size.
Width and height are missing
Layouts like fixed or responsive require valid values for width and height.
Incorrect layout selected
Choose the layout that suits the intended use so that ads are displayed optimally.
