AMP ページにワンタップを表示する

Accelerated Mobile Pages にワンタップを追加するには:

  1. 自身のウェブサイトでホストされている中間 iframe にワンタップを追加する。

  2. ワンタップではなく、中間の iframe を <amp-onetap-google> コンポーネントを使用して AMP ページに埋め込みます。

Google One をタップして表示したい AMP ページに、次のコード スニペットを配置します。

<script custom-element="amp-onetap-google" src="https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js" async></script>
<amp-onetap-google
  layout="nodisplay"
  data-src="https://example.com/onetap_iframe.html">
</amp-onetap-google>

data-src 属性を中間 iframe の URI に設定します。