The AMP One Tap component is deprecated. This means that new web apps shouldn't use this component, and developers of the existing apps should follow the
migration guide to make any necessary changes to avoid negative impacts for user sign-in to their websites.
Display One Tap in AMP pages
To add One Tap to your Accelerated Mobile Pages,
Add One Tap into an intermediate Iframe hosted by your own website.
Embed the intermediate iframe, instead of One Tap, into your AMP pages using
the <amp-onetap-google>
component.
Place the following code snippet into any AMP pages that you want Google One
Tap to display:
<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>
Set the data-src
attribute to the URI of your intermediate iframe.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 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."]]],[]]