Skip to content
Log in

Google address autocomplete

On this page

What you need

Add store variables

  1. Open your store in StoreConnect.
  2. In the Store Variables section, click New and add the following variables:
    1. Name - Address Auto-complete Google API Key - google_autocomplete_api_key Value - your Google Maps API key Available in Liquid - true
    2. Name - Address Auto-complete Countries Key - autocomplete_countries Value - 2-character, comma-separated ISO code for each country you want to support, for example US, CA (Google supports up to five at a time) Available in Liquid - true
    3. Name - Default Auto-complete Country Key - default_autocomplete_country Value - 2-character ISO code for one country you want to include Available in Liquid - true
  3. Click Save.

Update your theme layout template (in Liquid)

  1. Open your theme record in StoreConnect.
  2. Open the applicable Theme Template.
  3. If your theme doesn’t already have a theme template, grab it here and create one for your theme: theme.liquid
  4. Add the following code to the very bottom of the theme template Content section. This ensures address fields have loaded before the layout runs.
  5. Select Save.

```liquid

```

Was this article helpful?

Was this article helpful?