Load the client library

Be sure to load the client library on any page that a user might sign in on. Use the following code snippet:

<script src="https://accounts.google.com/gsi/client" async defer></script>

You can optimize your page's loading speed if you load the script with the async and defer boolean attributes.

Refer to the HTML and JavaScript API references for the list of methods and properties the library supports.