AMP with dynamic content




Tech Stack

Ruby, Sinatra, Docker, Google AMP

The Problem

AMP was becoming a major contributor to the ability to attract traffic from search engines. It was important that our client establish AMP versions of key content pages on their platform. But these content pages needed to serve a variable number of ads from an internal ad system. The challenge was to continue to have these ads show on AMP, a framework which imposes a high degree of constraint on page design and attributes.

Our Solution

We built AMP versions of the pages. We had to get creative about how to place a dynamic number of ads on a page that was served with static content in mind. Through the use of AMP caching rules and knowledge about how many ad spaces would be filled per page over future 12-hour periods, we were able to implement a solution that worked with the existing internal ad system.


With AMP in place, traffic from search engines saw an immediate and significant uptick. This led to a boost in revenue from ad sales and an increase in search engine ranking.