Installation

Examples for the installation of AMP-HTML ad units

Here you can find some examples to help you with the installation of your AMP HTML ad units. You can find detailed instructions in our support article on installing AMP HTML ads.

Advertising material with fixed size

The size of the ad is defined by the width and height attributes.

<amp-ad type="aduptech"
        layout="fixed"
        width="500"
        height="200"
        data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1">
</amp-ad>

Advertising media with dynamic size

The size of the ad media depends on the surrounding HTML container.

<style amp-custom>
    #parent {
        width:350px;
        height:300px;
        position:relative;
    }
</style>

<div id="parent">
    <amp-ad type="aduptech"
            layout="fill"
            data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1">
    </amp-ad>
</div>

Advertising media with fixed height and dynamic width

Uses the height set by the height attribute and the available width of the surrounding HTML container.

<amp-ad type="aduptech"
        layout="fixed-height"
        height="100"
        data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1">
</amp-ad>

Advertising media with fixed aspect ratio

Uses the available width/height of the surrounding HTML container, but respects the aspect ratio set by the width and height attributes (e.g. 16:9 or 1:1).

<amp-ad type="aduptech"
        layout="responsive"
        width="16"
        height="9"
        data-placementkey="07d120d1abbd5f37dc4f1f8feceaebe1">
</amp-ad>