To embed an Opinion Stage widget on an AMP site, you need to use the AMP Iframe element.

Follow these steps to embed an Opinion Stage widget on an AMP enabled site:

1) Add the following script to the head tag for your site to support the AMP iframe element:

<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>

2) After creating/publishing an item, click the "Embed & Share" button, and go to the iframe tab

Enter 350 in the width field and click "Measure"

3) Copy the calculated height (from the embed code) and the link

4) Paste the link & height you copied into the following code in the "height" and "src" fields:

<amp-iframe

width="350"

height="500"

sandbox="allow-scripts allow-same-origin"

layout="responsive"

frameborder="0"

src="https://www.opinionstage.com/api/v1/widgets/688856/iframe"

>

</amp-iframe>

5) Add the code to your page and the widget will be displayed in AMP enabled pages on mobile.

This code needs to be added in addition to the standard embed for desktop

Note: We will soon release a simplified version of AMP embedding that will let you just copy/paste code, nothing more! stay tuned!

Did this answer your question?