AMP ワンタップ コンポーネントのサポートが終了しました。つまり、新しいウェブアプリではこのコンポーネントを使用しないでください。既存のアプリのデベロッパーは、ユーザーがウェブサイトにログインした場合に悪影響が及ばないように、
移行ガイドに沿って必要な変更を行う必要があります。
AMP コンポーネント API リファレンス
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
このリファレンス ページでは、<amp-onetap-google>
AMP コンポーネントの API について説明します。
中間 iframe の使用方法については、Iframe を使用してワンタップを統合するガイドをご覧ください。
<amp-onetap-google>
AMP コンポーネントを読み込む
<amp-onetap-google>
AMP コンポーネントを使用する AMP ページに、次のコード スニペットを配置します。
<script custom-element="amp-onetap-google" src="https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js" async></script>
<amp-onetap-google>
AMP コンポーネント
次の表に、データ属性とその説明を示します。
属性 |
data-src |
ワンタップ中間 iframe の URI |
layout |
AMP コンポーネントのレイアウト。使用できるのは「nodisplay」のみです。 |
data-src
この属性は、ワンタップ ミドルウェア iframe の URI です。詳細については、次の表をご覧ください。
タイプ |
必須 |
例 |
文字列 |
はい |
data-src="https://example.com/onetap_iframe.html" |
レイアウト
この属性は AMP コンポーネントのレイアウトです。これは AMP コンポーネントの必須属性です。<amp-onetap-google>
コンポーネントでは、「nodisplay」のみが許可されます。詳しくは、以下の表をご覧ください。
タイプ |
必須 |
例 |
文字列 |
はい |
layout="nondisplay" |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-08 UTC。
[null,null,["最終更新日 2024-11-08 UTC。"],[[["\u003cp\u003eThis reference page describes the API of the \u003ccode\u003e<amp-onetap-google>\u003c/code\u003e AMP component, which enables One Tap sign-up/sign-in on AMP pages.\u003c/p\u003e\n"],["\u003cp\u003eTo use this component, you need to place a specific script tag into your AMP pages and configure the component with \u003ccode\u003edata-src\u003c/code\u003e and \u003ccode\u003elayout\u003c/code\u003e attributes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edata-src\u003c/code\u003e attribute specifies the URI of your One Tap intermediate iframe, while the \u003ccode\u003elayout\u003c/code\u003e attribute must be set to "nodisplay".\u003c/p\u003e\n"],["\u003cp\u003eRefer to the "Integrate One Tap using an Iframe" guide to learn how to use intermediate iframes for this implementation.\u003c/p\u003e\n"]]],[],null,["# AMP Component API reference\n\nThis reference page describes the API of the `\u003camp-onetap-google\u003e` AMP\ncomponent.\n\nSee the [Integrate One Tap using an Iframe](/identity/gsi/web/amp/intermediate-iframe) guide to learn how to use\nintermediate iframes.\n\nLoad the `\u003camp-onetap-google\u003e` AMP Component\n--------------------------------------------\n\nPlace the following code snippet into any AMP pages where you want to use the\n`\u003camp-onetap-google\u003e` AMP Component: \n\n \u003cscript custom-element=\"amp-onetap-google\" src=\"https://cdn.ampproject.org/v0/amp-onetap-google-0.1.js\" async\u003e\u003c/script\u003e\n\nThe `\u003camp-onetap-google\u003e` AMP Component\n---------------------------------------\n\nThe following table lists the data attributes with their descriptions:\n\n| Attribute ||\n|----------------------------------------------------------|---------------------------------------------------------------|\n| [data-src](/identity/gsi/web/amp/amp-reference#data-src) | The URI of your One Tap intermediate iframe |\n| [layout](/identity/gsi/web/amp/amp-reference#layout) | The layout of the AMP component. Only \"nodisplay\" is allowed. |\n\n### data-src\n\nThis attribute is the URI of your One Tap intermediate iframe. See the following\ntable for further information:\n\n| Type | Required | Example |\n|--------|----------|-----------------------------------------------------|\n| string | Yes | `data-src=\"https://example.com/onetap_iframe.html\"` |\n\n### layout\n\nThis attribute is the layout of the AMP component, which is a required attribute\nof AMP components. For the `\u003camp-onetap-google\u003e` component, only\n\"nodisplay\" is allowed. See the following table for further information:\n\n| Type | Required | Example |\n|--------|----------|-----------------------|\n| string | Yes | `layout=\"nondisplay\"` |"]]