Localize a Region in Store Locator


When you load the map that comes from the Google Maps JavaScript API, it applies a default bias for application behavior towards the United States.

If you want to change the localization (such as biasing geocoding results towards the region), you can override this default behavior by adding a region parameter to the <script> tag when loading the Store Locator map.

Example of Localization:

Without the Script
Without the script to change the region. Searching "Toledo" automatically populates in the US.
With the script
With the script and using the "GB" region. Searching "Toledo" now loads within Spain.

To localize a region in Store Locator, please follow these steps:

  1. From Shopify's admin, select Apps.

    Select Apps

  2. Select Store Locator.

    Select Store Locator

  3. Select Settings.

    select settings

  4. Select Display Settings.

    select display settings

  5. Copy and paste this into the Page Header HTML box:
    <script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&region=GB">

    Page Header HTML

  6. Replace "YOUR_API_KEY" with Your API Key.

    Note: Your API Key is in Store Locator, under Need Help? -> Google Map API Key.

    Replace your API Key

  7. Replace the "GB" after region with Your Region.
    • Australia = AU
    • Canada = CA
    • France - FR
    • United Kingdom = GB
    • United States = US

    Replace the region

  8. Select Save.

    Select Save

That's it! 

Next Steps:

Blog Posts:

0 out of 0 found this helpful



Please sign in to leave a comment.