Skip to main content

Installing StoreRocket on Squarespace

How to add your store locator to a Squarespace website, including the Ajax loading fix.

Squarespace works well with StoreRocket. This guide covers the install, plus one fix that only older Squarespace templates need.

Adding the embed code

  1. In StoreRocket, open Store Locator > Install (open the Install page) and copy the embed code

  2. In Squarespace, open the page where you want the store locator

  3. Add a Code Block (click the + button, search for "Code")

  4. Paste the StoreRocket embed code

  5. Make sure Display Source is unchecked

  6. Click Save

Your store locator should appear on the page.

Ajax loading issue (older templates only)

Only older Squarespace 7.0 sites can have this issue. Ajax loading exists in the Brine, Farro, Skye, Tremont and York template families. Squarespace 7.1 sites don't have Ajax loading, so you can skip this section.

With Ajax loading on, Squarespace doesn't do a full page reload when visitors click between pages. A visitor who clicks a link to your store locator page sees "Store locator is loading from StoreRocket" and the map never appears. Opening the page directly works.

Fix: Disable Ajax loading in Squarespace:

  1. Go to Design > Site Styles in your Squarespace admin

  2. Search for Enable Ajax loading

  3. Uncheck it

  4. Save

This forces Squarespace to do full page reloads, which ensures the StoreRocket script runs every time.

If you'd rather keep Ajax loading on, link to your store locator page with its full URL (https://yoursite.com/store-locator, not /store-locator). Squarespace then does a full load for that page. This also works in the Skye family, where Ajax loading can't be turned off.

Making the widget full width

By default, Squarespace content blocks have padding on the sides. To make your store locator stretch full width:

  1. In the Squarespace editor, click on the section containing your Code Block

  2. Go to section settings

  3. Set Content Width to Full or Full Bleed

Troubleshooting

Widget not appearing at all

Make sure you're using a Code Block, not a Markdown Block or Text Block. Only Code Blocks execute JavaScript.

Locator only loads when you open its page directly

Your site has Ajax loading on. Turn it off or use full-URL links, as described above.

Widget shows but map is blank

Open Connect your map, choose Google Maps or Mapbox, then select I already have a key. Paste your key or token and select Connect.

Questions? Message us on live chat.

Did this answer your question?