This sample demonstrates how to implement a simple banner AMP Ad. In general an AMP Ad should be a valid AMP document.
The code represents the body that should be returned as a response initiated through an amp-ad component or otherwise whenever we want to return an AMP Ad in any other context.
This example consists of an image and a rendering tracking pixel that are implemented respectively using
As part of any other AMP document, we import the canonical boiler plate to make it a valid AMP document.
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
The anatonomy of banner ad is an image with a hyperlink to the advertiser's page. We display the image for the creative using amp-img.
We include a tracking pixel to record that the ad was rendered using amp-pixel.
Alternatively one could make use of amp-analytics to enable much more comprenhensive measure activity.