Glossary

Code Injection (Squarespace)

Code Injection is a Squarespace feature that lets you add your own HTML and scripts to specific parts of a site, such as the header or footer of every page, without editing the template. It’s available on the Core, Plus and Advanced plans and some legacy plans, and is often used for analytics, fonts and third-party tools.

Where Code Injection Lives

On version 7.1 sites, click Custom Code at the bottom of the Pages panel, then open Code Injection. On version 7.0 sites, the same options are under Website Tools. Paste your code into the right field and click Save.

Each field puts code in a different place:

  • Header: added inside the <head> tag of every page. Most tracking codes, verification tags and widgets go here.
  • Footer: added just before the closing </body> tag on every page.
  • Lock Page: shown above the password field on password-protected sites and pages.
  • Order Confirmation and order status pages: runs after checkout on commerce sites.

There’s also page-level code injection. Hover over a page in the Pages panel, click the gear icon, and open Advanced to add code to that page’s header only. Blog posts have their own field for code that appears on each post.

Who Can Use It

Code Injection is available on the Core, Plus and Advanced plans and some legacy plans. If a client is on the Basic plan, the panel won’t be there, and the fix is a plan upgrade, not a workaround.

Only the site owner and administrators can open it. A Squarespace contributor with the Website editor role can edit page content but can’t touch Code Injection, which is worth knowing when a client asks you to install something on a site where you only have editor access.

What Designers Use It For

  • Analytics and ad tracking scripts.
  • Search console and domain verification tags.
  • Custom fonts loaded from an outside service.
  • Third-party tools such as chat, booking or review widgets.

Bridge installs this way. You paste the Bridge Code into the site’s Header Code Injection once, and the Bridge widget appears inside the Squarespace editor for you and your client. It never shows on the live site. The Squarespace setup guide walks through it step by step.

Common Code Injection Mistakes

  • Pasting a snippet into the footer when the vendor says header, or the other way round. Follow the instructions for each tool.
  • Pasting broken or incomplete HTML. A missing closing tag can affect how the whole site renders.
  • Leaving old scripts behind after a client stops using a tool. Clean them out at handoff and during care plan checks.
  • Assuming Squarespace support will debug it. Squarespace’s help center says its support team can’t help add custom code or troubleshoot problems it causes.

If custom code stops the editor from working properly, Squarespace suggests clicking Disable Scripts in Preview at the bottom of the site, and checking the live site in a private window.

Common Questions

Which Squarespace plans have Code Injection?

Core, Plus and Advanced, plus some legacy plans. It isn’t available on the Basic plan.

Where is Code Injection in Squarespace 7.1?

Open the Pages panel, click Custom Code at the bottom, then Code Injection. For a single page, use the gear icon on that page and open Advanced.

Should code go in the header or footer?

Use whichever the tool’s instructions say. Most tracking codes and widgets ask for the header; scripts that should load after the page content often go in the footer.

Can a website editor contributor use Code Injection?

No. Only the owner and administrators can use Code Injection.

Chat directly
on Squarespace.

Bridge helps you stay connected with the clients you manage. Chat directly and make every conversation count.