How to create and implement Adsense AMP ad units

AMP ad
This guide shows you how to create your Adsense AMP ads for your websites AMP pages. Follow three simple steps to implement the ad code on your Accelerated Mobile Pages (AMP) / posts.

Your AMP ad units can either be responsive or fixed sized. Google recommends you to use responsive AMP ad units and so do we. So why should you choose this format?

Answer: Responsive AMP ad units automatically resize and use the full width of the screen. Google optimizes the dimensions of the ads to ensure they perform well on your posts.

Lets get started

First you make sure you’ve added the required AMP script to your pages that you want to show AMP ads.

To add the AMP script, copy and paste the following code between theĀ <head></head> tags of your AMP HTML. If you use WordPress we recommend to use the plugin Ad Inserter by Igor Funa to easily insert the code (just Google it):

Create your responsive AMP ad unit

It’s not possible to generate the Amp ad code within Adsense so you need to create it manually by following the steps below:

1. Create a new responsive ad unit in your AdSense account.

It will look look something like this:

2. In the ad code of the responsive ad unit you created in step 1, use the following information:

Your publisher ID: ca-pub-1234567891234567
Your ad unit’s ID: 1234567890

3. Now create your responsive AMP ad unit

Copy the following ad code and replace the publisher ID and ad unit’s ID values with your own values from step 2.

That’s all. Hope you found the post useful.