AMP ワンタップ コンポーネントのサポートが終了しました。つまり、新しいウェブアプリではこのコンポーネントを使用しないでください。既存のアプリのデベロッパーは、ユーザーがウェブサイトにログインした場合に悪影響が及ばないように、
移行ガイドに沿って必要な変更を行う必要があります。
AMP ページにワンタップを表示する
Accelerated Mobile Pages にワンタップを追加するには、
独自のウェブサイトでホストされている中間 iframe にワンタップを追加します。
<amp-onetap-google>
コンポーネントを使用して、One Tap ではなく中間 iframe を 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 に設定します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-20 UTC。
[null,null,["最終更新日 2024-09-20 UTC。"],[[["Google One Tap can be integrated into Accelerated Mobile Pages (AMP) using an intermediate iframe hosted on your website."],["Instead of directly embedding One Tap, embed this intermediate iframe into your AMP pages using the `\u003camp-onetap-google\u003e` component."],["You need to include a specific script tag and the `\u003camp-onetap-google\u003e` tag within your AMP pages, pointing the `data-src` attribute to your iframe's URL, for One Tap to function correctly."]]],[]]