Categories
Random

Google AMP Ads and standard webpages

Have you ever tried using amp ads on non-amp/standard webpages? Sounds weird given that amp components are supposed to be used on amp pages only. However, the way amp is evolving, there is a possibility that we could use amp as a Framework also.

At first, I did an experiment of using amp-ad component on a standard html (non-amp) page. For which I used amp runtime script which also adds amp-ad under the hood, and ultimately uses gpt JS library for ads.

Why I did this? So basically I wanted to get coding simplified for myself. Whenever we want to use ads on website, we have to use gpt JS and write a bunch of code with size mapping for responsive ads, check for visibility of ads, element’s presence in DOM etc. I figured if amp-ad is already doing it, and amp is made for optimized page rendering and no content blocking.

My team and I worked on this idea and made a WordPress plugin that people can use and integrate amp ads on on-amp pages also, obviously it will work on AMP without any code changes. Basically same code base for both and Non-AMP. You can give it a try in WordPress with this plugin AMP Admanager. Currently greaterkashmir.com is showing ads using this plugin.

On the similar lines, AMP pages team is working on Bento AMP which basically make AMP a framework to use on Non-AMP pages.

Leave a Reply