Knowledge base / Platforms

Fix map blocks on Wix, Squarespace and Shopify

Hosted platforms wrap Google Maps in their own blocks, sections and apps. When a map breaks, the fix is often in the platform's settings or a theme option rather than in Google Cloud Console. The three platforms fail in the same few ways, so start by working out which kind of map you have.

Pick your platform

The rest of this page covers what the three have in common, so you can narrow the cause down before you open the platform guide.

How to tell this is your problem

  • The map worked before a theme update, a theme switch or a new app install.
  • The editor preview shows the map, but the published site doesn't.
  • The map appears after you accept the cookie banner, or never appears for visitors who decline.
  • The console shows a Maps error naming a key you don't recognise, or no Maps request at all.

First, which kind of map is it?

Every platform map falls into one of three groups. Open the published page, choose View source or use the browser's network tab, and search for google.com/maps and maps.googleapis.com/maps/api/js.

What you findWhat it isWho holds the key
google.com/maps/embed?pb=… or maps.google.com/maps?…&output=embedKeyless embedNobody. There is no key to fix.
google.com/maps/embed/v1/…?key=…Maps Embed APIThe platform, a theme or you
maps.googleapis.com/maps/api/js?key=…Maps JavaScript APIThe platform, a theme, an app or you

Built-in map elements on Wix and Squarespace are managed by the platform. If one of those breaks across many sites at once, it's a platform issue and the fix is to wait or contact their support. Maps added by a theme, an app or your own code use a key that someone on your side controls.

The shared failure patterns

Consent and cookie tools

Cookie banners often hold back third-party content, including Google Maps, until the visitor agrees. That is often the intended behaviour, but it causes two problems. If the tool classifies Maps as marketing or advertising, visitors who decline never see a map. If the tool's placeholder doesn't render correctly, nobody sees anything at all, not even an explanation. Check the tool's settings for how it classifies Google Maps, and make sure blocked maps show a placeholder with a link to open the location in Google Maps.

Theme and app updates

A theme update can reset section settings, rename the key field or replace a JavaScript map with a keyless embed. Switching themes leaves the old theme's key behind. Map and store locator apps can stop loading when their subscription lapses or when they are uninstalled but their code stays in the theme. After any update, check the map on the live site, not just in the editor.

Keyless embeds versus API key blocks

Keyless embeds rarely break because of anything in Google Cloud. If one fails, look at the HTML: a truncated pb= string, an & escaped twice, or the share link pasted instead of the embed code. Blocks that use your own key fail with the usual key errors. The commonest are RefererNotAllowedMapError after a domain change, because the key's website restrictions still list the old platform subdomain, and ApiNotActivatedMapError when a new feature such as address search needs another API.

Domain changes

Moving from a platform subdomain to your own domain, or adding www, changes the address the browser reports to Google. Add every hostname the site is served from to the key's website restrictions. See fixing referrer restrictions.

The fix, step by step

  1. 01Load the published page in a private window with the console open and note any Maps error.
  2. 02Identify the map type using the table above.
  3. 03If it's a keyless embed, regenerate the code from Google Maps' Share → Embed a map and paste it again in the platform's embed or code block.
  4. 04If it uses a key, find where the key is set: the theme's map section, the app's settings or your custom code. Re-enter it with no spaces around it.
  5. 05In Google Cloud Console, check the key's website restrictions include your live domain and its API restrictions include the API the block uses.
  6. 06Check your consent tool's settings for Google Maps.
  7. 07Publish or save the site again. Some platforms only apply setting changes on publish.
  8. 08If the block stays broken, replace it with an embed block containing a share embed or a Maps Embed API iframe.

Confirm it is fixed

View the live site in a private window. Decline consent once and accept it once, and check what a visitor sees each time. Then scan the page. The scan loads it from a clean session with no stored consent, and lists every Maps request and console error it finds.

Common questions

Do I need a Google Maps API key on Wix or Squarespace?

Not for the built-in map elements, which the platform manages. You only need your own key if you add a map through custom code, a third-party app or a theme feature that asks for one.

Why does the map show in the editor but not on the live site?

The editor often skips the consent banner and runs on a different domain. Check consent settings first, then whether the key's website restrictions include your live domain.

Should I just use an embed instead of the platform's block?

If you only need one location, an iframe from Google Maps' Share → Embed a map dialog is the most robust option. It has no key to manage and survives theme changes.

Check whether this is your error

A scan tells you in about twelve seconds, from a clean session.

Related articles