AMP plugin with support of own JavaScript codes

The Accelerated Mobile Pages (AMP) generator for creating Google AMP pages , the AMP plugins and the AMPHTML tag generator support the adoption of your own JavaScripts.


Integrate specific JavaScript


Custom JavaScripts and Iframe content can only be used in AMP pages under certain conditions.

Your own JavaScript code can only be loaded into AMPHTML if it is inserted via an iframe.

In turn, iframes in AMPHTML (via '‎amp-iframe' tag) only accept content that has an encrypted ‎HTTPS connection.

If you want to use your own JavaScripts in AMPHTML, you must provide them via an HTTPS connection and then integrate them into the respective subpage of the website via Iframe, so that the Accelerated Mobile Pages Generator can then also recognize your own JavaScripts and convert them to 'amp Convert -iframe 'tags and integrate them into the AMP page.

The AMPHTML generator recognizes the integrated iframes (including the JavaScripts), converts them into corresponding 'amp-iframe' tags, and makes the own JavaScripts contained therein available in the AMP version.

To use your own JavaScript in AMPHTML, the following conditions must be met:

  • Your own JavaScript must be accessible under HTTPS
  • Your own JavaScript must be embedded via an iframe