All Collections
API Documentation
Global Optimization
Optimize Google AMP Display Based On Your Best Test Message
Optimize Google AMP Display Based On Your Best Test Message
Apply your best performing creatives to the display of your content on Google AMP
Naytev Team avatar
Written by Naytev Team
Updated over a week ago


Optimizing your content on AMP articles using Naytev's Global Optimization Service is as easy as updating the content on your page. Using the Naytev Results API, you will need to retrieve the data regarding your content. The response, either a 200 or 204 response, will share the best data if it is available. Once you have the winning variant, you can render it on your AMP page.

Update Your AMP Content

When render your AMP specified content you can replace the title, subheader and primary image with the content returned by Naytev. Here is an example in Ruby on Rails:

<script type="application/ld+json">
   "headline":"<%= @response.headline || @article.headline %>",
      "url":"<%= @response.image || @article.image %>",
         "name":"Hayley Peterson",
      "name":"Business Insider",
   "description":"<%= @response.description || @article.description %>"

You can also update any images or headlines within the content of your article. This is just updating HTML as normal.

Refresh Google AMP Cache

As long as the webservers manage the web page cache headers according to HTML standards, there is nothing you need to do to manual update the Google AMP chache. The Google AMP cache will automatically purge after 15 seconds. You can learn more about the AMP cache here:

Did this answer your question?