Add a Floating Widget to Every Page in Squarespace

Free

Squarespace has one field that puts a script on every page: Code Injection > Footer. Build the widget free on Zyff, paste it there, and read the two exceptions below.

Build your widget first, then follow the steps below

Free, no signup, no API key — every widget has a live editor.

Pick a widget

Site-wide widgets on Squarespace

Squarespace's Code Injection panel is the cleanest site-wide install of the six platforms here — one textarea, applied to every page, no theme files to edit and nothing to re-apply when the template updates. Two things are worth knowing before you rely on it. Code Injection sits behind the Business plan and above; the entry tier cannot run custom code at all, and there is no workaround because Code Blocks are gated on the same tier. And the footer field covers your ordinary pages but not the site-wide password screen, which has its own separate injection field — so a site under construction can look as though nothing was saved when in fact the widget is waiting behind the lock.

Build and style the widget in the Zyff widget builder, then follow the Squarespace steps below to put it on every page.

How to add a site-wide widget to Squarespace

  1. Build the widget and copy the code

    Set the widget up in any Zyff builder and copy the embed code — one <div> and one <script> tag. Both lines go in together.

  2. Open Settings > Advanced > Code Injection

    From the site dashboard go to Settings, then Advanced, then Code Injection. On 7.1 this is under Website > Website Tools in some accounts; both routes land on the same panel. 7.0 and 7.1 behave identically here.

  3. Paste into the Footer field

    Put the snippet in the Footer box, not the Header. Footer code is injected before the closing body tag, so the widget's script never competes with your images and fonts for the first paint. Click Save.

  4. If your site is password-protected, fill the Lock Page field too

    The site-wide password screen does not receive footer injection. If you are building behind a lock and want the widget visible there, paste the snippet into the Lock Page code injection field as well — otherwise expect it to be absent until the site is public.

  5. View the live site, not the editor

    Squarespace does not execute injected code in the editing view. Open the site in a normal browser tab — or an incognito window if you are password-protected — and click through two pages to confirm.

Squarespace-specific things worth knowing

Code Injection needs the Business plan or higher

The Personal tier cannot run custom code anywhere — not Code Injection, not Code Blocks. There is no partial version of this: on that plan the widget cannot be installed at all.

The lock screen is a separate field

A site-wide password page ignores footer injection and has its own Lock Page injection box. This is why a widget can look completely broken on a site under construction and then appear the moment it goes public.

Injected code does not run in the editor

The editing view strips it, so there is nothing to see while you are working. Judge it from the live site only.

Footer, not Header

Both fields put the code on every page, but Header injection runs before your content exists and delays the first paint for no benefit. The widget has nothing to render until the page is there.

Commerce pages have their own injection point

Checkout and order-confirmation pages are outside normal footer injection. On Commerce plans there is a dedicated Order Confirmation Page injection field; the checkout itself takes no custom code.

It survives template changes

Because the snippet lives in a settings field rather than in template files, switching templates or accepting a Squarespace update does not remove it — unlike the theme-file route on Shopify.

Widgets that belong on every page

Frequently asked questions

How do I add code to every page in Squarespace?

Settings > Advanced > Code Injection, and paste into the Footer field. That applies to every ordinary page on the site, with no template files to edit and nothing to re-apply after an update.

Which plan do I need?

Business or higher. Squarespace's Personal tier cannot run custom code at all — neither Code Injection nor Code Blocks — so there is no way to install the widget on that plan.

Why is the widget missing while my site is password-protected?

The site-wide lock screen does not receive footer injection. Paste the snippet into the Lock Page code injection field as well if you want it visible there; otherwise it appears as soon as the site is public.

Header or Footer?

Footer. Both cover every page, but header code runs before your content exists and delays the first paint. The widget has nothing to paint until the page is there, so there is no upside to loading it earlier.

Nothing happens in the Squarespace editor.

Expected. Injected code is stripped from the editing view. Open the live site in a normal tab — or an incognito window if the site is locked — and check there.

Will it appear on my checkout?

No. Squarespace's checkout does not take custom code. On Commerce plans there is a separate injection field for the order confirmation page, which is the only part of that flow you can reach.

The same widget on another platform